本文整理汇总了Java中org.alfresco.service.cmr.dictionary.PropertyDefinition.getName方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyDefinition.getName方法的具体用法?Java PropertyDefinition.getName怎么用?Java PropertyDefinition.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.dictionary.PropertyDefinition
的用法示例。
在下文中一共展示了PropertyDefinition.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateDeleteProperty
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
private void validateDeleteProperty(final String tenantDomain, final PropertyDefinition propDef)
{
final QName propName = propDef.getName();
// We need a separate transaction to do the qname delete "check"
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>()
{
@Override
public Void execute() throws Throwable
{
return TenantUtil.runAsTenant(new TenantRunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
try
{
// The property QName may not have been created in the database if no
// properties have been created that use it, so check first and then
// try to delete it.
if(qnameDAO.getQName(propName) != null)
{
qnameDAO.deleteQName(propName);
}
}
catch(DataIntegrityViolationException e)
{
// catch data integrity violation e.g. foreign key constraint exception
logger.debug(e);
throw new ModelInUseException("Failed to validate property delete, property " + propName + " is in use");
}
return null;
}
}, tenantDomain);
}
}, false, true);
}
示例2: getNodes
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public void getNodes(NodeParameters nodeParameters, NodeQueryCallback callback)
{
if(enabled)
{
QName shardPropertQName = null;
if(nodeParameters.getShardProperty() != null)
{
PropertyDefinition pdef = QueryParserUtils.matchPropertyDefinition(NamespaceService.CONTENT_MODEL_1_0_URI, namespaceService, dictionaryService, nodeParameters.getShardProperty());
if(pdef == null)
{
throw new AlfrescoRuntimeException("Invalid shard property: "+nodeParameters.getShardProperty());
}
if((!pdef.getDataType().getName().equals(DataTypeDefinition.TEXT)) && (!pdef.getDataType().getName().equals(DataTypeDefinition.DATE)) && (!pdef.getDataType().getName().equals(DataTypeDefinition.DATETIME)))
{
throw new AlfrescoRuntimeException("Unsupported shard property type: "+(pdef.getDataType().getName() + " for " +nodeParameters.getShardProperty()));
}
shardPropertQName = pdef.getName();
}
List<Node> nodes = solrDAO.getNodes(nodeParameters, shardPropertQName);
for (Node node : nodes)
{
callback.handleNode(node);
}
}
}
示例3: M2PropertyDefinition
import org.alfresco.service.cmr.dictionary.PropertyDefinition; //导入方法依赖的package包/类
M2PropertyDefinition(
ClassDefinition classDef,
PropertyDefinition propertyDef,
M2PropertyOverride override,
NamespacePrefixResolver prefixResolver,
Map<QName, ConstraintDefinition> modelConstraints)
{
this.classDef = classDef;
this.name = propertyDef.getName();
this.dataType = propertyDef.getDataType();
this.propertyTypeName = this.dataType.getName();
this.m2Property = createOverriddenProperty(propertyDef, override, prefixResolver, modelConstraints);
}