本文整理汇总了Java中org.alfresco.service.cmr.dictionary.DictionaryService.getType方法的典型用法代码示例。如果您正苦于以下问题:Java DictionaryService.getType方法的具体用法?Java DictionaryService.getType怎么用?Java DictionaryService.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.alfresco.service.cmr.dictionary.DictionaryService
的用法示例。
在下文中一共展示了DictionaryService.getType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateDefinition
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
@Override
public void updateDefinition(DictionaryService dictionaryService)
{
TypeDefinition typeDef = dictionaryService.getType(alfrescoName);
if (typeDef != null)
{
setTypeDefDisplayName(typeDef.getTitle(dictionaryService));
setTypeDefDescription(typeDef.getDescription(dictionaryService));
}
else
{
super.updateDefinition(dictionaryService);
}
updateTypeDefInclProperties();
}
示例2: matchTypeDefinition
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static TypeDefinition matchTypeDefinition(String string, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService)
{
QName search = QName.createQName(expandQName(string, namespacePrefixResolver));
TypeDefinition typeDefinition = dictionaryService.getType(search);
QName match = null;
if (typeDefinition == null)
{
for (QName definition : dictionaryService.getAllTypes())
{
if (definition.getNamespaceURI().equalsIgnoreCase(search.getNamespaceURI()))
{
if (definition.getLocalName().equalsIgnoreCase(search.getLocalName()))
{
if (match == null)
{
match = definition;
}
else
{
throw new QueryModelException("Ambiguous data datype " + string);
}
}
}
}
}
else
{
return typeDefinition;
}
if (match == null)
{
return null;
}
else
{
return dictionaryService.getType(match);
}
}
示例3: getPackageResources
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
/**
* @return the resources from the package attached to this workflow task
*/
public List<TemplateContent> getPackageResources()
{
List<TemplateContent> resources = new ArrayList<TemplateContent>();
List<NodeRef> contents = this.services.getWorkflowService().getPackageContents(this.task.id);
NodeService nodeService = this.services.getNodeService();
DictionaryService ddService = this.services.getDictionaryService();
for(NodeRef nodeRef : contents)
{
QName type = nodeService.getType(nodeRef);
// make sure the type is defined in the data dictionary
if (ddService.getType(type) != null)
{
// look for content nodes or links to content
// NOTE: folders within workflow packages are ignored for now
if (ddService.isSubClass(type, ContentModel.TYPE_CONTENT) ||
ApplicationModel.TYPE_FILELINK.equals(type))
{
resources.add(new TemplateNode(nodeRef, this.services, this.resolver));
}
}
}
return resources;
}
示例4: hasAuditableAspect
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
/**
* @param typeQName a node type
* @return <tt>true</tt> if the type given has the <b>cm:auditable</b> aspect by default
*/
public static boolean hasAuditableAspect(QName typeQName, DictionaryService dictionaryService)
{
TypeDefinition typeDef = dictionaryService.getType(typeQName);
if (typeDef == null)
{
return false;
}
return typeDef.getDefaultAspectNames().contains(ContentModel.ASPECT_AUDITABLE);
}
示例5: matchTypeDefinition
import org.alfresco.service.cmr.dictionary.DictionaryService; //导入方法依赖的package包/类
public static TypeDefinition matchTypeDefinition(String defaultNameSpaceUri, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService, String string)
{
QName search = QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string));
TypeDefinition typeDefinition = dictionaryService.getType(QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string)));
QName match = null;
if (typeDefinition == null)
{
for (QName definition : dictionaryService.getAllTypes())
{
if (definition.getNamespaceURI().equalsIgnoreCase(search.getNamespaceURI()))
{
if (definition.getLocalName().equalsIgnoreCase(search.getLocalName()))
{
if (match == null)
{
match = definition;
}
else
{
throw new DictionaryException("Ambiguous data datype " + string);
}
}
}
}
}
else
{
return typeDefinition;
}
if (match == null)
{
return null;
}
else
{
return dictionaryService.getType(match);
}
}