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


Java StoreRef.getIdentifier方法代码示例

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


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

示例1: ObjectReference

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
ObjectReference(StoreRef ref, String id)
{
    String[] relativePath = id.split("/");

    // bug fix MNT-16380
    // for using a relative path to a node id eg. 18cc-.../folder1/.../folderN/fileA.txt
    // if only one slash we don't have a relative path
    if (relativePath.length <= 2)
    {
        if (id.indexOf('/') != -1)
        {
            id = id.substring(0, id.indexOf('/'));
        }
        this.ref = new NodeRef(ref, id);
    }
    else
    {
        String[] reference = new String[relativePath.length + 2];
        reference[0] = ref.getProtocol();
        reference[1] = ref.getIdentifier();
        System.arraycopy(relativePath, 0, reference, 2, relativePath.length);
        this.ref = repository.findNodeRef("node", reference);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-remote-api,代码行数:25,代码来源:StreamContent.java

示例2: RepositoryLocation

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
/**
 * Constructor
 * 
 * @param storeRef       the store reference (e.g. 'workspace://SpacesStore' )
 * @param path           the path (e.g. '/app:company_home/app:dictionary/app:models' )
 * @param queryLanguage  the query language (e.g. 'xpath' or 'lucence')
 */
public RepositoryLocation(StoreRef storeRef, String path, String queryLanguage)
{
    this.storeProtocol = storeRef.getProtocol();
    this.storeId = storeRef.getIdentifier();
    this.path = path;
    
    setQueryLanguage(queryLanguage);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:RepositoryLocation.java

示例3: stringifyRepositoryLocation

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
@Override
public String stringifyRepositoryLocation(RepositoryNodeRef repositoryNodeRef) throws ReferenceEncodingException
{
    NodeRef nodeRef = repositoryNodeRef.getNodeRef();
    StoreRef storeRef = nodeRef.getStoreRef();

    return NODE + DELIMITER + storeRef.getProtocol() + DELIMITER + storeRef.getIdentifier() + DELIMITER
                + nodeRef.getId();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:10,代码来源:PlainStringifier.java

示例4: propagateNodeRefMutations

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
@Override
public Reference propagateNodeRefMutations(NodeRef mutatedNodeRef, Reference reference)
{
    StoreRef storeRef = mutatedNodeRef.getStoreRef();
    String storeId = storeRef.getIdentifier();
    String protocol = storeRef.getProtocol();

    if (Version2Model.STORE_ID.equals(storeId) || VersionModel.STORE_ID.equals(storeId)
                || VersionBaseModel.STORE_PROTOCOL.equals(protocol))
    {
        Resource resource = reference.getResource();
        if (resource instanceof RepositoryResource)
        {
            RepositoryResource repositoryResource = (RepositoryResource) resource;
            RepositoryLocation location = repositoryResource.getLocation();
            if (location instanceof RepositoryNodeRef)
            {
                RepositoryNodeRef repositoryNodeRef = (RepositoryNodeRef) location;
                NodeRef nodeRef = repositoryNodeRef.getNodeRef();
                NodeRef nodeRefPropagation = new NodeRef(mutatedNodeRef.getStoreRef(),
                                                         nodeRef.getId());
                Resource resourcePropagation = new RepositoryResource(new RepositoryNodeRef(nodeRefPropagation));

                return new Reference(reference.getEncoding(),
                                     reference.getProtocol(),
                                     resourcePropagation,
                                     reference.getParameters());
            }
        }
    }

    // default branch

    return reference;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:36,代码来源:NodeProtocol.java

示例5: createTenantShare

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
/**
 * Create a tenant domain specific share
 */
private final DiskSharedDevice createTenantShare(String tenantDomain)
{
    logger.debug("create tenant share for domain " + tenantDomain);
       StoreRef storeRef = new StoreRef(getStoreName());
       NodeRef rootNodeRef = new NodeRef(storeRef.getProtocol(), storeRef.getIdentifier(), "dummy"); 
       
       // Root nodeRef is required for storeRef part
       
       rootNodeRef = m_alfrescoConfig.getTenantService().getRootNode(
               m_alfrescoConfig.getNodeService(), 
               m_alfrescoConfig.getSearchService(),
       		m_alfrescoConfig.getNamespaceService(), 
       		getRootPath(), 
       		rootNodeRef);

       //  Create the disk driver and context

       DiskInterface diskDrv = getRepoDiskInterface();
       ContentContext diskCtx = new ContentContext(m_tenantShareName, getStoreName(), getRootPath(), rootNodeRef);
       
       // Set a quota manager for the share, if enabled
       
       if ( m_quotaManager != null)
       {
       	diskCtx.setQuotaManager( m_quotaManager);
       }
       
       if(m_config instanceof ServerConfigurationBean)
       {
           ServerConfigurationBean config = (ServerConfigurationBean)m_config;
           
           config.initialiseRuntimeContext("cifs.tenant." + tenantDomain, diskCtx);
       }
       else
       {
           throw new AlfrescoRuntimeException("configuration error, unknown configuration bean");
       }
       
       //  Default the filesystem to look like an 80Gb sized disk with 90% free space

       diskCtx.setDiskInformation(new SrvDiskInfo(2560, 64, 512, 2304));

       //  Create a temporary shared device for the user to access the tenant company home directory

       return new DiskSharedDevice(m_tenantShareName, diskDrv, diskCtx);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:50,代码来源:MultiTenantShareMapper.java

示例6: convertStoreRef

import org.alfresco.service.cmr.repository.StoreRef; //导入方法依赖的package包/类
/**
 * Create Version Store Ref
 * 
 * @param  storeRef ref
 * @return  store ref for version store
 */
public static StoreRef convertStoreRef(StoreRef storeRef)
{
    return new StoreRef(StoreRef.PROTOCOL_WORKSPACE, storeRef.getIdentifier());
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:11,代码来源:VersionUtil.java


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