本文整理汇总了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();
}
示例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);
}
}
示例3: setTrustStorePath
import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStorePath(String trustStorePath)
{
if (PropertyCheck.isValidPropertyString(trustStorePath))
{
this.trustStorePath = trustStorePath;
}
}
示例4: setTrustStoreType
import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStoreType(String trustStoreType)
{
if (PropertyCheck.isValidPropertyString(trustStoreType))
{
this.trustStoreType = trustStoreType;
}
}
示例5: setTrustStorePassPhrase
import org.alfresco.util.PropertyCheck; //导入方法依赖的package包/类
public void setTrustStorePassPhrase(String trustStorePassPhrase)
{
if (PropertyCheck.isValidPropertyString(trustStorePassPhrase))
{
this.trustStorePassPhrase = trustStorePassPhrase;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}