wt.inf.container
Interface WTContainerServiceSvr

All Known Implementing Classes:
StandardWTContainerService

public interface WTContainerServiceSvr



Supported API: true

Extendable: false


Method Summary
 void checkIdentity(WTContainer container)
          Throws a UniquenessException if a container with the same name and parent as the given container already exists.
 ExchangeContainer createExchange()
          Used internally by the container service during the installation process.
 boolean exists(WTContainer container)
          Determines if a container with the same name and parent as the given container already exists.
 ScheduleQueue getDeleteQueue()
          Gets the ScheduleQueue used for deleting and restoring the contents of a container when the container is deleted or restored.
 WTOrganization getOrganization(Object requestor)
          Provides a delegation point to handle situations where the application requires that a WTOrganization exist.
 String getUnusedDomainName(String name, AdminDomainRef parent_domain_ref)
          Returns a version of the supplied name that does not corresponding to an existing AdministrativeDomain in the given parent domain.
 boolean isInApplicationGeneratedDomain(WTOrganization org)
          Determines if the organization is stored in an "org" domain automatically generated by the container service.
 void save(CreatorsMap map)
          Configures and persists any new CreatorsLinks in the given map.
 void setClassic(WTContainer classic)
          Used internally by the container service during the installation process.
 

Method Detail

checkIdentity

public void checkIdentity(WTContainer container)
                   throws WTException
Throws a UniquenessException if a container with the same name and parent as the given container already exists.

Supported API: false

Parameters:
container -
Throws:
WTException

createExchange

public ExchangeContainer createExchange()
                                 throws WTException
Used internally by the container service during the installation process. This method should never need to be called during normal system operation.

Supported API: false

Returns:
ExchangeContainer
Throws:
WTException

getDeleteQueue

public ScheduleQueue getDeleteQueue()
Gets the ScheduleQueue used for deleting and restoring the contents of a container when the container is deleted or restored.

If a service needs to do some work once a container's content is deleted or restored, it can add a queue entry from the appropriate POST listener.



Supported API: false

Returns:
ScheduleQueue
See Also:
wt#fc#delete#DeleteManager

getOrganization

public WTOrganization getOrganization(Object requestor)
                               throws WTException
Provides a delegation point to handle situations where the application requires that a WTOrganization exist. The requestor parameter is the object that is driving the requirement for the organization to be created. In OOTB 7.0, the requestor can be:
  1. An OrgContainer. In this case, the container creation process needs to ensure that a corresponding WTOrganization exists for the container it is about to create.
  2. A WTPrincipal. In this case, the team service is adding a new user to a team and needs to add the user to the appropriate "org group".
This method delegates to an instance of WTOrganizationValidator.

Supported API: true

Parameters:
requestor -
Returns:
Either a newly created or a pre-existing WTOrganization
Throws:
WTException

getUnusedDomainName

public String getUnusedDomainName(String name,
                                  AdminDomainRef parent_domain_ref)
                           throws WTException
Returns a version of the supplied name that does not corresponding to an existing AdministrativeDomain in the given parent domain. After first shortening the name to ensure it fits within AdministrativeDomain.name's upper limit, the implementation makes several attempst to handle domain name confilicts. If the a domain with the name returned by attempt zero, it will construct modified versions of the name iteratively until no existing domain is found.

The format for domain names is:

The implementation will make WTContainerServerHelper.MAX_DOMAIN_CREATION_ATTEMPTS attempts to find a non-existing domain. This value can be configured in wt.properties by the wt.inf.container.WTContainerServerHelper.maxDomainCreationAttempts property.

Supported API: false

Parameters:
name -
parent_domain_ref - This parameter can be null to allow for searching for a container "root" domain.
Returns:
String
Throws:
WTException

isInApplicationGeneratedDomain

public boolean isInApplicationGeneratedDomain(WTOrganization org)
                                       throws WTException
Determines if the organization is stored in an "org" domain automatically generated by the container service. These domains are created by the getOrganization(Object) API.

Supported API: false

Parameters:
org -
Returns:
boolean
Throws:
WTException

exists

public boolean exists(WTContainer container)
               throws WTException
Determines if a container with the same name and parent as the given container already exists.

Supported API: false

Parameters:
container -
Returns:
boolean
Throws:
WTException

save

public void save(CreatorsMap map)
          throws WTException
Configures and persists any new CreatorsLinks in the given map. If any of the CreatorsLinks have a null creators group reference, a creators group is created for them.

Supported API: false

Parameters:
map -
Throws:
WTException
See Also:
CreatorsMap

setClassic

public void setClassic(WTContainer classic)
                throws WTException
Used internally by the container service during the installation process. This method should never need to be called during normal system operation.

Supported API: false

Parameters:
classic -
Throws:
WTException