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


Java DictionaryService类代码示例

本文整理汇总了Java中org.alfresco.service.cmr.dictionary.DictionaryService的典型用法代码示例。如果您正苦于以下问题:Java DictionaryService类的具体用法?Java DictionaryService怎么用?Java DictionaryService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DictionaryService类属于org.alfresco.service.cmr.dictionary包,在下文中一共展示了DictionaryService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateProperty

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public void updateProperty(DictionaryService dictionaryService, PropertyDefinitionWrapper propertyDefWrap)
{
    if (propertyDefWrap != null && propertyDefWrap.getPropertyDefinition().getDisplayName() == null)
    {
        AbstractPropertyDefinition<?> property = (AbstractPropertyDefinition<?>) propertyDefWrap.getPropertyDefinition();
        org.alfresco.service.cmr.dictionary.PropertyDefinition propDef = dictionaryService
                .getProperty(QName.createQName(property.getLocalNamespace(), property.getLocalName()));
        if (propDef != null)
        {
            String displayName = propDef.getTitle(dictionaryService);
            String description = propDef.getDescription(dictionaryService);
            property.setDisplayName(displayName == null ? property.getId() : displayName);
            property.setDescription(description == null ? property.getDisplayName() : description);
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:17,代码来源:AbstractTypeDefinitionWrapper.java

示例2: loadModel

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
/**
 * Loads the test model required for building the node graphs
 */
public static DictionaryService loadModel(ApplicationContext applicationContext)
{
    DictionaryDAO dictionaryDao = (DictionaryDAO) applicationContext.getBean("dictionaryDAO");
    // load the system model
    ClassLoader cl = BaseNodeServiceTest.class.getClassLoader();
    InputStream modelStream = cl.getResourceAsStream("alfresco/model/contentModel.xml");
    assertNotNull(modelStream);
    M2Model model = M2Model.createModel(modelStream);
    dictionaryDao.putModel(model);
    // load the test model
    modelStream = cl.getResourceAsStream("org/alfresco/repo/node/BaseNodeServiceTest_model.xml");
    assertNotNull(modelStream);
    model = M2Model.createModel(modelStream);
    dictionaryDao.putModel(model);
    
    DictionaryComponent dictionary = new DictionaryComponent();
    dictionary.setDictionaryDAO(dictionaryDao);
    // done
    return dictionary;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:24,代码来源:BaseNodeServiceTest.java

示例3: TaskFormPersister

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public TaskFormPersister(ContentModelItemData<WorkflowTask> itemData,
            NamespaceService namespaceService,
            DictionaryService dictionaryService,
            WorkflowService workflowService,
            NodeService nodeService,
            AuthenticationService authenticationService,
            BehaviourFilter behaviourFilter, Log logger)
{
    super(itemData, namespaceService, dictionaryService, logger);
    WorkflowTask item = itemData.getItem();

    // make sure that the task is not already completed
    if (item.getState().equals(WorkflowTaskState.COMPLETED))
    {
        throw new AlfrescoRuntimeException("workflowtask.already.done.error");
    }

    // make sure the current user is able to edit the task
    if (!workflowService.isTaskEditable(item, authenticationService.getCurrentUserName()))
    {
        throw new AccessDeniedException("Failed to update task with id '" + item.getId() + "'.");
    }
    
    this.updater = new TaskUpdater(item.getId(), workflowService, nodeService, behaviourFilter);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:TaskFormPersister.java

示例4: makeAssociationFields

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
/**
 * Generates a list of association fields with values.
 * 
 * @param assocDefs List of association definitions to generate
 * @param values Map containing the values to use for each property
 * @param group The group the field belongs to
 * @param namespaceService NamespaceService instance
 * @return List of generated Field objects
 */
public static List<Field> makeAssociationFields(
            Collection<AssociationDefinition> assocDefs,
            Map<AssociationDefinition, Object> values,
            FieldGroup group,
            NamespaceService namespaceService,
            DictionaryService dictionaryService)
{
    AssociationFieldProcessor processor = new AssociationFieldProcessor(namespaceService, dictionaryService);
    ArrayList<Field> fields = new ArrayList<Field>(assocDefs.size());
    for (AssociationDefinition propDef : assocDefs)
    {
        Object value = values == null ? null : values.get(propDef);
        Field field = processor.makeField(propDef, value, group);
        fields.add(field);
    }
    return fields;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:27,代码来源:FieldUtils.java

示例5: makeDefaultFieldProcessor

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
private FieldProcessor makeDefaultFieldProcessor(NamespaceService namespaceService,
        DictionaryService dictionaryService)
{
    DefaultFieldProcessor processor = new DefaultFieldProcessor();
    processor.setDictionaryService(dictionaryService);
    processor.setNamespaceService(namespaceService);
    try 
    {
        processor.afterPropertiesSet();
    }
    catch (Exception e) 
    {
        throw new RuntimeException(e);
    }
    return processor;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:MockFieldProcessorRegistry.java

示例6: setUp

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    super.setUp();
    super.item = new Item("task", TASK_ID);
    task = makeTask();
    super.workflowService = makeWorkflowService();
    super.nodeService = makeNodeService();
    DictionaryService dictionaryService = makeDictionaryService();
    super.namespaceService = makeNamespaceService();
    authenticationService = makeAuthenticationService();
    personService = makePersonService();
    MockFieldProcessorRegistry fieldProcessorRegistry = new MockFieldProcessorRegistry(namespaceService,
                dictionaryService);
    DefaultFieldProcessor defaultProcessor = super.makeDefaultFieldProcessor(dictionaryService);
    super.processor = makeTaskFormProcessor(dictionaryService, fieldProcessorRegistry, defaultProcessor);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:TaskFormProcessorTest.java

示例7: GetChildrenCannedQuery

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public GetChildrenCannedQuery(
        NodeDAO nodeDAO,
        QNameDAO qnameDAO,
        CannedQueryDAO cannedQueryDAO,
        NodePropertyHelper nodePropertyHelper,
        TenantService tenantService,
        NodeService nodeService,
        MethodSecurityBean<NodeRef> methodSecurity,
        CannedQueryParameters params,
        HiddenAspect hiddenAspect,
        DictionaryService dictionaryService,
        Set<QName> ignoreAspectQNames)
{
    super(nodeDAO, qnameDAO, cannedQueryDAO, nodePropertyHelper, tenantService, nodeService, methodSecurity, params);
    
    this.hiddenAspect = hiddenAspect;
    this.dictionaryService = dictionaryService;
    
    this.nodeService = nodeService;
    this.ignoreAspectQNames = ignoreAspectQNames;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:GetChildrenCannedQuery.java

示例8: AbstractIntegrityEvent

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
/**
 * Constructor with helper values for storage
 */
protected AbstractIntegrityEvent(
        NodeService nodeService,
        DictionaryService dictionaryService,
        NodeRef nodeRef,
        QName typeQName,
        QName qname)
{
    this.nodeService = nodeService;
    this.dictionaryService = dictionaryService;
    this.traces = new ArrayList<StackTraceElement[]>(0);
    
    this.nodeRef = nodeRef;
    this.typeQName = typeQName;
    this.qname = qname;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:AbstractIntegrityEvent.java

示例9: prepare

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
@Override
public void prepare(NamespaceService namespaceService, DictionaryService dictionaryService, QNameDAO qnameDAO, NodeDAO nodeDAO, TenantService tenantService, Set<String> selectors,
        Map<String, Argument> functionArgs, FunctionEvaluationContext functionContext, boolean supportBooleanFloatAndDouble)
{
    for (Constraint constraint : getConstraints())
    {
        if (constraint instanceof DBQueryBuilderComponent)
        {
            if(constraint.getOccur() == Occur.OPTIONAL)
            {
                throw new QueryModelException("Disjunctions are not suported");
            }
            DBQueryBuilderComponent dbQueryBuilderComponent = (DBQueryBuilderComponent) constraint;
            dbQueryBuilderComponent.prepare(namespaceService, dictionaryService, qnameDAO, nodeDAO, tenantService, selectors, functionArgs, functionContext, supportBooleanFloatAndDouble);
        }
        else
        {
            throw new UnsupportedOperationException();
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:DBConjunction.java

示例10: SOLRTest

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
SOLRTest(
    RetryingTransactionHelper txnHelper, FileFolderService fileFolderService,
    NodeDAO nodeDAO, QNameDAO qnameDAO, NodeService nodeService, DictionaryService dictionaryService,
    NodeRef rootNodeRef, String containerName, boolean doNodeChecks, boolean doMetaDataChecks)
    {
this.txnHelper = txnHelper;
this.nodeService = nodeService;
this.rootNodeRef = rootNodeRef;
this.fileFolderService = fileFolderService;
this.nodeDAO = nodeDAO;
this.qnameDAO = qnameDAO;
this.dictionaryService = dictionaryService;

this.containerName = containerName;
this.nodeAssertions = new HashMap<NodeRef, NodeAssertions>();
this.nodeIds = new ArrayList<Long>(getExpectedNumNodes());

this.doNodeChecks = doNodeChecks;
this.doMetaDataChecks = doMetaDataChecks;
this.doChecks = doNodeChecks || doMetaDataChecks;
    }
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:SOLRTrackingComponentTest.java

示例11: updateProperties

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public void updateProperties(DictionaryService dictionaryService)
{
    for (PropertyDefinitionWrapper propertyDefWrap : propertiesById.values())
    {
        updateProperty(dictionaryService, propertyDefWrap);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:8,代码来源:AbstractTypeDefinitionWrapper.java

示例12: PropertiesIntegrityEvent

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
protected PropertiesIntegrityEvent(
        NodeService nodeService,
        DictionaryService dictionaryService,
        NodeRef nodeRef)
{
    super(nodeService, dictionaryService, nodeRef, null, null);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:PropertiesIntegrityEvent.java

示例13: TaskFormProcessor

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public TaskFormProcessor(WorkflowService workflowService, NamespaceService namespaceService,
        DictionaryService dictionaryService, AuthenticationService authenticationService,
        PersonService personService, FieldProcessorRegistry fieldProcessorRegistry)
{
    this.workflowService = workflowService;
    this.namespaceService = namespaceService;
    this.dictionaryService = dictionaryService;
    this.authenticationService = authenticationService;
    this.personService = personService;
    this.fieldProcessorRegistry = fieldProcessorRegistry;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:12,代码来源:TaskFormProcessor.java

示例14: matchAspectDefinition

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
public static AspectDefinition matchAspectDefinition(String defaultNameSpaceUri, NamespacePrefixResolver namespacePrefixResolver, DictionaryService dictionaryService, String string)
{
    QName search = QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string));
    AspectDefinition aspectDefinition = dictionaryService.getAspect(QName.createQName(expandQName(defaultNameSpaceUri, namespacePrefixResolver, string)));
    QName match = null;
    if (aspectDefinition == null)
    {
        for (QName definition : dictionaryService.getAllAspects())
        {
            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 aspectDefinition;
    }
    if (match == null)
    {
        return null;
    }
    else
    {
        return dictionaryService.getAspect(match);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:39,代码来源:QueryParserUtils.java

示例15: getIsLinkToDocument

import org.alfresco.service.cmr.dictionary.DictionaryService; //导入依赖的package包/类
/**
 * @return true if this Node is a Link to a Document (i.e. a filelink)
 */
public boolean getIsLinkToDocument()
{
    if (isLinkToDocument == null)
    {
        DictionaryService dd = this.services.getDictionaryService();
        isLinkToDocument = Boolean.valueOf(dd.isSubClass(getType(), ApplicationModel.TYPE_FILELINK));
    }
    
    return isLinkToDocument.booleanValue();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:14,代码来源:BaseContentNode.java


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