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


Java DictionaryService.getType方法代码示例

本文整理汇总了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();
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:18,代码来源:DocumentTypeDefinitionWrapper.java

示例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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:39,代码来源:DBQuery.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:Workflow.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:14,代码来源:AuditablePropertiesEntity.java

示例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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:39,代码来源:QueryParserUtils.java


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