当前位置: 首页>>代码示例>>Java>>正文


Java PropertyCheck.isValidPropertyString方法代码示例

本文整理汇总了Java中org.alfresco.util.PropertyCheck.isValidPropertyString方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyCheck.isValidPropertyString方法的具体用法?Java PropertyCheck.isValidPropertyString怎么用?Java PropertyCheck.isValidPropertyString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.alfresco.util.PropertyCheck的用法示例。


在下文中一共展示了PropertyCheck.isValidPropertyString方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setFolderPath

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
/**
 * Set the folder name path <b>relative to the {@link #getFolderPath() path}</b>.
 * 
 * @param folderPath            a folder-name path using the '<b>/</b>' path separator e.g. '<b>IMAP HOME/MAIL-1</b>'
 */
public void setFolderPath(String folderPath)
{
    if (!PropertyCheck.isValidPropertyString(folderPath))
    {
        throw new IllegalArgumentException("Invalid folder name path for property 'folderPath': " + folderPath);
    }
    StringTokenizer tokenizer = new StringTokenizer(folderPath, "/");
    StringBuilder pathBuff = new StringBuilder(folderPath.length());
    while (tokenizer.hasMoreTokens())
    {
        String folderName = tokenizer.nextToken();
        if (folderName.length() == 0)
        {
            throw new IllegalArgumentException("Invalid folder name path for property 'folderPath': " + folderPath);
        }
        pathBuff.append(folderName);
        if (tokenizer.hasMoreTokens())
        {
            pathBuff.append('/');
        }
    }
    this.folderPath = pathBuff.toString();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:29,代码来源:RepositoryFolderConfigBean.java

示例2: init

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void init()
{
    if (!PropertyCheck.isValidPropertyString(getLocation()))
    {
        setLocation(null);
    }
    if (!PropertyCheck.isValidPropertyString(getProvider()))
    {
        setProvider(null);
    }
    if (!PropertyCheck.isValidPropertyString(getType()))
    {
        setType(null);
    }
    if (!PropertyCheck.isValidPropertyString(getKeyMetaDataFileLocation()))
    {
        setKeyMetaDataFileLocation(null);
    }        
}
 
开发者ID:Alfresco,项目名称:alfresco-core,代码行数:20,代码来源:KeyStoreParameters.java

示例3: setTrustStorePath

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStorePath(String trustStorePath)
{
    if (PropertyCheck.isValidPropertyString(trustStorePath))
    {
        this.trustStorePath = trustStorePath;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:LDAPInitialDirContextFactoryImpl.java

示例4: setTrustStoreType

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStoreType(String trustStoreType)
{
    if (PropertyCheck.isValidPropertyString(trustStoreType))
    {
        this.trustStoreType = trustStoreType;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:LDAPInitialDirContextFactoryImpl.java

示例5: setTrustStorePassPhrase

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStorePassPhrase(String trustStorePassPhrase)
{
    if (PropertyCheck.isValidPropertyString(trustStorePassPhrase))
    {
        this.trustStorePassPhrase = trustStorePassPhrase;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:LDAPInitialDirContextFactoryImpl.java

示例6: setUsername

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
@Override
public void setUsername(String userName)
{
    if (PropertyCheck.isValidPropertyString(userName))
    {
        super.setUsername(userName);
    }
    else
    {
        super.setUsername(null);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AlfrescoJavaMailSender.java

示例7: setPassword

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
@Override
public void setPassword(String password)
{
    if (PropertyCheck.isValidPropertyString(password))
    {
        super.setPassword(password);
    }
    else
    {
        super.setPassword(null);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:AlfrescoJavaMailSender.java

示例8: parseProperties

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
private void parseProperties()
{
    String userPropertyValue = userFilterPattern;
    if (!PropertyCheck.isValidPropertyString(userPropertyValue))
    {
        return;
    }
    
    String[] arrValues = userPropertyValue.split(REG_EXP_SEPARATOR);
    for (String prop : arrValues)
    {
        boolean includeExp = prop.charAt(0) != NOT;

        if (!includeExp || prop.startsWith(ESCAPED_NOT))
        {
            prop = prop.substring(1);
        }
        try
        {
            listOfPairValue.add(new Pair<Boolean, Pattern>(includeExp, Pattern.compile(prop)));
        }
        catch (PatternSyntaxException ex)
        {
            throw new AlfrescoRuntimeException("The 'audit.filter.alfresco-access.transaction.user' property parse exception; see property 'audit.filter.alfresco-access.transaction.user'.", ex);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:28,代码来源:UserAuditFilter.java

示例9: setDbSchemaName

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
/**
 * Set db.schema.name to be used
 */
public void setDbSchemaName(String dbSchemaName)
{
    if (PropertyCheck.isValidPropertyString(dbSchemaName))
    {
        this.dbSchemaName = dbSchemaName;
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:11,代码来源:SchemaBootstrap.java

示例10: setUp

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception
{
    failCount = new MutableInt(0);
    transactionService = ctx.getBean("transactionComponent", TransactionService.class);
    properties = ctx.getBean("global-properties", Properties.class);

    String dbPoolMaxProp = properties.getProperty("db.pool.max");
    if (PropertyCheck.isValidPropertyString(dbPoolMaxProp))
    {
        dbPoolMax = Integer.parseInt(dbPoolMaxProp);
    }
    else
    {
        throw new InvalidArgumentException("The db.pool.max property is not valid.");
    }
    
    String dbPoolWaitMaxProp = properties.getProperty("db.pool.wait.max");
    if (PropertyCheck.isValidPropertyString(dbPoolWaitMaxProp))
    {
        dbPoolWaitMax = Integer.parseInt(dbPoolWaitMaxProp);
    }
    else
    {
        throw new InvalidArgumentException("The db.pool.wait.max property is not valid.");
    }
    
    dbPoolWaitMax = dbPoolWaitMax == -1 ? 100 : dbPoolWaitMax;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:ConnectionPoolOverloadTest.java

示例11: getStoreName

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
/**
 * @return              Returns the name of the store
 * @throws ServletException if the store name was not set
 */
public String getStoreName() throws ServletException
{
    if (!PropertyCheck.isValidPropertyString(storeName))
    {
        throw new ServletException("WebDAV missing 'storeName' value.");
    }
    return storeName;
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:13,代码来源:WebDAVServlet.java

示例12: getRootPath

import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
/**
 * @return              Returns the WebDAV root path within the store
 * @throws ServletException if the root path was not set
 */
public String getRootPath() throws ServletException
{
    if (!PropertyCheck.isValidPropertyString(rootPath))
    {
        throw new ServletException("WebDAV missing 'rootPath' value.");
    }
    return rootPath;
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:13,代码来源:WebDAVServlet.java


注:本文中的org.alfresco.util.PropertyCheck.isValidPropertyString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。