Exemplo n.º 1
0
  /* (non-Javadoc)
   * @see org.alfresco.repo.tenant.TenantService#getName(org.alfresco.service.cmr.repository.StoreRef)
   */
  public StoreRef getName(StoreRef storeRef) {
    if (storeRef == null) {
      return null;
    }

    return new StoreRef(storeRef.getProtocol(), getName(storeRef.getIdentifier()));
  }
Exemplo n.º 2
0
  /**
   * 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);
  }
Exemplo n.º 3
0
  /* (non-Javadoc)
   * @see org.alfresco.repo.tenant.TenantService#getName(java.lang.String, org.alfresco.service.cmr.repository.StoreRef)
   */
  public StoreRef getName(String username, StoreRef storeRef) {
    if (storeRef == null) {
      return null;
    }

    if (username != null) {
      int idx = username.lastIndexOf(SEPARATOR);
      if ((idx > 0) && (idx < (username.length() - 1))) {
        String tenantDomain = username.substring(idx + 1);
        return new StoreRef(
            storeRef.getProtocol(), getName(storeRef.getIdentifier(), tenantDomain));
      }
    }

    return storeRef;
  }