當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。