Package org.alfresco.repo.tenant
Class SingleTServiceImpl
- java.lang.Object
-
- org.alfresco.repo.tenant.SingleTServiceImpl
-
- All Implemented Interfaces:
TenantService
,TenantUserService
public class SingleTServiceImpl extends java.lang.Object implements TenantService
Empty Tenant Service implementation (for Single-Tenant / Single-Instance)
-
-
Field Summary
-
Fields inherited from interface org.alfresco.repo.tenant.TenantService
DEFAULT_DOMAIN, SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description SingleTServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkDomain(java.lang.String name)
void
checkDomainUser(java.lang.String username)
java.lang.String
getBaseName(java.lang.String name)
java.lang.String
getBaseName(java.lang.String name, boolean forceForNonTenant)
AssociationRef
getBaseName(AssociationRef assocRef)
ChildAssociationRef
getBaseName(ChildAssociationRef childAssocRef)
ChildAssociationRef
getBaseName(ChildAssociationRef childAssocRef, boolean forceForNonTenant)
NodeRef
getBaseName(NodeRef nodeRef)
NodeRef
getBaseName(NodeRef nodeRef, boolean forceForNonTenant)
StoreRef
getBaseName(StoreRef storeRef)
QName
getBaseName(QName name, boolean forceForNonTenant)
java.lang.String
getBaseNameUser(java.lang.String name)
java.lang.String
getCurrentUserDomain()
java.lang.String
getDomain(java.lang.String name)
java.lang.String
getDomain(java.lang.String name, boolean checkCurrentDomain)
java.lang.String
getDomainUser(java.lang.String baseUsername, java.lang.String tenantDomain)
java.lang.String
getName(java.lang.String name)
StoreRef
getName(java.lang.String username, StoreRef storeRef)
AssociationRef
getName(AssociationRef assocRef)
ChildAssociationRef
getName(ChildAssociationRef childAssocRef)
NodeRef
getName(NodeRef nodeRef)
NodeRef
getName(NodeRef inNodeRef, NodeRef nodeRef)
QName
getName(NodeRef inNodeRef, QName name)
StoreRef
getName(StoreRef storeRef)
QName
getName(QName name)
java.lang.String
getPrimaryDomain(java.lang.String user)
In a single tenant system, always return the DEFAULT_DOMAIN.NodeRef
getRootNode(NodeService nodeService, SearchService searchService, NamespaceService namespaceService, java.lang.String rootPath, NodeRef rootNodeRef)
Tenant
getTenant(java.lang.String tenantDomain)
java.lang.String
getUserDomain(java.lang.String username)
boolean
isEnabled()
boolean
isTenantName(java.lang.String name)
boolean
isTenantUser()
boolean
isTenantUser(java.lang.String username)
-
-
-
Method Detail
-
getName
public NodeRef getName(NodeRef nodeRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public NodeRef getName(NodeRef inNodeRef, NodeRef nodeRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public StoreRef getName(StoreRef storeRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public ChildAssociationRef getName(ChildAssociationRef childAssocRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public AssociationRef getName(AssociationRef assocRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public StoreRef getName(java.lang.String username, StoreRef storeRef)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public QName getName(QName name)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public QName getName(NodeRef inNodeRef, QName name)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getName
public java.lang.String getName(java.lang.String name)
- Specified by:
getName
in interfaceTenantService
- Returns:
- the reference with the tenant-specific ID attached
-
getBaseName
public QName getBaseName(QName name, boolean forceForNonTenant)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public NodeRef getBaseName(NodeRef nodeRef)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public NodeRef getBaseName(NodeRef nodeRef, boolean forceForNonTenant)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public StoreRef getBaseName(StoreRef storeRef)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public ChildAssociationRef getBaseName(ChildAssociationRef childAssocRef)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public ChildAssociationRef getBaseName(ChildAssociationRef childAssocRef, boolean forceForNonTenant)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public AssociationRef getBaseName(AssociationRef assocRef)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public java.lang.String getBaseName(java.lang.String name)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseName
public java.lang.String getBaseName(java.lang.String name, boolean forceForNonTenant)
- Specified by:
getBaseName
in interfaceTenantService
- Returns:
- the reference without the tenant-specific ID attached
-
getBaseNameUser
public java.lang.String getBaseNameUser(java.lang.String name)
- Specified by:
getBaseNameUser
in interfaceTenantUserService
- Returns:
- the username without the tenant-specific ID attached
-
checkDomainUser
public void checkDomainUser(java.lang.String username)
- Specified by:
checkDomainUser
in interfaceTenantService
-
checkDomain
public void checkDomain(java.lang.String name)
- Specified by:
checkDomain
in interfaceTenantService
-
getRootNode
public NodeRef getRootNode(NodeService nodeService, SearchService searchService, NamespaceService namespaceService, java.lang.String rootPath, NodeRef rootNodeRef)
- Specified by:
getRootNode
in interfaceTenantService
-
isTenantUser
public boolean isTenantUser()
- Specified by:
isTenantUser
in interfaceTenantService
-
isTenantUser
public boolean isTenantUser(java.lang.String username)
- Specified by:
isTenantUser
in interfaceTenantService
-
isTenantName
public boolean isTenantName(java.lang.String name)
- Specified by:
isTenantName
in interfaceTenantService
-
getUserDomain
public java.lang.String getUserDomain(java.lang.String username)
- Specified by:
getUserDomain
in interfaceTenantService
- Specified by:
getUserDomain
in interfaceTenantUserService
- Returns:
- the tenant-specific ID for specified username
-
getCurrentUserDomain
public java.lang.String getCurrentUserDomain()
- Specified by:
getCurrentUserDomain
in interfaceTenantUserService
- Returns:
- the tenant-specific ID for current user
-
getDomain
public java.lang.String getDomain(java.lang.String name)
- Specified by:
getDomain
in interfaceTenantService
- Returns:
- the tenant-specific ID for specified identifier
-
getDomain
public java.lang.String getDomain(java.lang.String name, boolean checkCurrentDomain)
- Specified by:
getDomain
in interfaceTenantService
- Returns:
- the tenant-specific ID for specified identifier
-
getDomainUser
public java.lang.String getDomainUser(java.lang.String baseUsername, java.lang.String tenantDomain)
- Specified by:
getDomainUser
in interfaceTenantUserService
- Returns:
- the username with the tenant-specific ID attached
-
getTenant
public Tenant getTenant(java.lang.String tenantDomain)
- Specified by:
getTenant
in interfaceTenantService
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceTenantUserService
- Returns:
- true if the system is configured to be MT-enabled
-
getPrimaryDomain
public java.lang.String getPrimaryDomain(java.lang.String user)
In a single tenant system, always return the DEFAULT_DOMAIN.- Specified by:
getPrimaryDomain
in interfaceTenantService
- Parameters:
user
- The user whose primary domain is to be returned- Returns:
- The primary domain of user, or null if the domain does not exist in the system.
- See Also:
TenantService
-
-