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


Java ContentModel.PROP_NAME属性代码示例

本文整理汇总了Java中org.alfresco.model.ContentModel.PROP_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java ContentModel.PROP_NAME属性的具体用法?Java ContentModel.PROP_NAME怎么用?Java ContentModel.PROP_NAME使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.alfresco.model.ContentModel的用法示例。


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

示例1: getChildByName

@Override
public Reference getChildByName(Reference reference, QName assocTypeQName, String childName)
            throws VirtualizationException
{
    VirtualFolderDefinition structure = resolveVirtualFolderDefinition(reference);
    VirtualFolderDefinition theChild = structure.findChildByName(childName);

    if (theChild != null)
    {
        return reference.execute(new GetChildByIdMethod(theChild.getId()));
    }
    else
    {
        final VirtualQuery query = structure.getQuery();

        if (query != null)
        {
            PropertyValueConstraint constraint = new PropertyValueConstraint(new FilesFoldersConstraint(BasicConstraint.INSTANCE,
                                                                                                        true,
                                                                                                        true),
                                                                             ContentModel.PROP_NAME,
                                                                             childName,
                                                                             environment
                                                                                         .getNamespacePrefixResolver());
            PagingResults<Reference> result = query.perform(environment,
                                                            constraint,
                                                            null,
                                                            reference);
            List<Reference> page = result.getPage();

            return page == null || page.isEmpty() ? null : page.get(0);
        }
        else
        {
            return null;
        }
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:38,代码来源:VirtualStoreImpl.java

示例2: perform

/**
 * @deprecated will be replaced by
 *             {@link #perform(ActualEnvironment, VirtualQueryConstraint,Reference)}
 *             once complex constrains are implemented
 */
@Override
public PagingResults<Reference> perform(ActualEnvironment environment, boolean files, boolean folders,
            String pattern, Set<QName> searchTypeQNames, Set<QName> ignoreTypeQNames, Set<QName> ignoreAspectQNames,
            List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest, Reference parentReference)
            throws VirtualizationException
{

    if (!files && !folders)
    {
        if (logger.isDebugEnabled())
        {
            logger.debug("Deprecated query  will be skipped due do incompatible types request.");
        }

        return asPagingResults(environment,
                               pagingRequest,
                               new EmptyResultSet(),
                               parentReference);

    }
    else
    {
        VirtualQueryConstraint constraint = BasicConstraint.INSTANCE;
        constraint = new FilesFoldersConstraint(constraint,
                                                files,
                                                folders);
        if(pattern != null){
            constraint = new NamePatternPropertyValueConstraint(constraint,
                                        ContentModel.PROP_NAME,
                                        pattern,
                                        environment.getNamespacePrefixResolver());
        }
        constraint = new IgnoreConstraint(constraint,
                                          ignoreTypeQNames,
                                          ignoreAspectQNames);
        constraint = new PagingRequestConstraint(constraint,
                                                 pagingRequest);
        constraint = new SortConstraint(constraint,
                                        sortProps);

        return perform(environment,
                       constraint,
                       null,
                       parentReference);
    }

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:52,代码来源:VirtualQueryImpl.java

示例3: search

@Override
public List<Reference> search(Reference reference, String namePattern, boolean fileSearch, boolean folderSearch,
            boolean includeSubFolders) throws VirtualizationException
{
    VirtualFolderDefinition structure = resolveVirtualFolderDefinition(reference);
    List<Reference> result = new LinkedList<Reference>();
    List<Reference> childReferences = createChildReferences(reference,
                                                            structure);
    if (folderSearch)
    {
        result.addAll(childReferences);
    }
    if (includeSubFolders)
    {
        for (Reference childRef : childReferences)
        {
            List<Reference> childResults = search(childRef,
                                                  namePattern,
                                                  fileSearch,
                                                  folderSearch,
                                                  includeSubFolders);
            result.addAll(childResults);
        }
    }
    if (fileSearch)
    {
        final VirtualQuery query = structure.getQuery();
        if (query != null)
        {
            VirtualQueryConstraint vqConstraint = null;
            if (namePattern == null)
            {
                vqConstraint = BasicConstraint.INSTANCE;
            }
            else
            {
                vqConstraint = new NamePatternPropertyValueConstraint(new FilesFoldersConstraint(BasicConstraint.INSTANCE,
                                                                                                 true,
                                                                                                 true),
                                                                      ContentModel.PROP_NAME,
                                                                      namePattern,
                                                                      environment.getNamespacePrefixResolver());
            }
            PagingResults<Reference> queryNodes = query.perform(environment,
                                                                vqConstraint,
                                                                null,
                                                                reference);
            result.addAll(queryNodes.getPage());
        }
    }
    return result;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:52,代码来源:VirtualStoreImpl.java

示例4: getChildName

/**
 * Get the child name to import node under
 * 
 * @param context  the node
 * @return  the child name
 */
private QName getChildName(ImportNode context)
{
    QName assocType = getAssocType(context);
    QName childQName = null;
    
    // Determine child name
    String childName = context.getChildName();
    if (childName != null)
    {
        childName = bindPlaceHolder(childName, binding);
        // <Fix for ETHREEOH-2299>
        if (ContentModel.TYPE_PERSON.equals(context.getTypeDefinition().getName())
                && assocType.equals(ContentModel.ASSOC_CHILDREN))
        {
            childName = childName.toLowerCase();
        }
        // </Fix for ETHREEOH-2299>
        String[] qnameComponents = QName.splitPrefixedQName(childName);
        childQName = QName.createQName(qnameComponents[0], QName.createValidLocalName(qnameComponents[1]), namespaceService); 
    }
    else
    {
        Map<QName, Serializable> typeProperties = context.getProperties();
        
        Serializable nameValue = typeProperties.get(ContentModel.PROP_NAME);

        if(nameValue != null && !String.class.isAssignableFrom(nameValue.getClass()))
        {
            throw new  ImporterException("Unable to use childName property: "+ ContentModel.PROP_NAME + " is not a string");  
        }
        
        String name = (String)nameValue;
        
        if (name != null && name.length() > 0)
        {
            name = bindPlaceHolder(name, binding);
            String localName = QName.createValidLocalName(name);
            childQName = QName.createQName(assocType.getNamespaceURI(), localName);
        }
    }
    
    return childQName;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:49,代码来源:ImporterComponent.java

示例5: newTransformationOptions

protected TransformationOptions newTransformationOptions(Action ruleAction, NodeRef sourceNodeRef)
{
    return new TransformationOptions(sourceNodeRef, ContentModel.PROP_NAME, null, ContentModel.PROP_NAME);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:4,代码来源:TransformActionExecuter.java

示例6: getMappedProperty

public QName getMappedProperty()
{
    return ContentModel.PROP_NAME;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:4,代码来源:NameProperty.java

示例7: ContentStreamFileNameProperty

public ContentStreamFileNameProperty(ServiceRegistry serviceRegistry, CMISConnector connector)
{
    super(serviceRegistry, connector, PropertyIds.CONTENT_STREAM_FILE_NAME, ContentModel.PROP_NAME);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:4,代码来源:ContentStreamFileNameProperty.java


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