wt.inf.container
Class StandardWTContainerService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.inf.container.StandardWTContainerService
All Implemented Interfaces:
Manager, NetFactor, Serializable, WTContainerService, WTContainerServiceSvr

public final class StandardWTContainerService
extends StandardManager
implements WTContainerService, WTContainerServiceSvr

Use the newStandardWTContainerService static factory method(s), not the StandardWTContainerService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private static class StandardWTContainerService.DomainInfo
           
private static class StandardWTContainerService.IsAdministratorKey
           
static class StandardWTContainerService.TemplateTypes
           
 
Field Summary
private  AuditServiceEventHandler auditServiceEventHandler
           
private static String CLASSNAME
           
private static Vector CREATE_PERMISSION
           
private static boolean DEBUG
           
private  DeleteManagerEventHandler deleteManagerEventHandler
           
protected static String DOMAIN_ID
           
protected  ExchangeContainer exchange
           
private  FolderServiceEventHandler folderServiceEventHandler
           
private  IdentityServiceEventHandler identityServiceEventHandler
           
protected static Object IS_ADMINISTRATOR_CONTEXT_KEY
           
private static DebugWriter LOG
           
private  PersistenceManagerEventHandler persistenceManagerEventHandler
           
private static Vector READ_PERMISSION
           
private static String RESOURCE
           
private  WorkInProgressEventHandler workInProgressEventHandler
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardWTContainerService()
           
 
Method Summary
protected static void addPermissionForCheckout(WTCollection targetCollection)
           
 boolean canCreate(Class container_class, WTUser user)
          Uses a CanCreateDelegate to determine if the user can create a container of type container_class in their organization's OrgContainer.
 boolean canCreate(Class container_class, WTUser user, WTContainerRef parent_ref)
          Uses a CanCreateDelegate to determine if the given user can create an instance of the given container class in the given container.
 WTContainer changePublicParentDomain(WTContainer container, AdminDomainRef new_parent)
          Changes a WTContainer's publicParentDomain property.
 OrgContainer changeRestrictedDirectorySearchScope(OrgContainer container, boolean restrict)
          Changes a persistent OrgContainer's restrictedDirectorySearchScope property.
 void checkCreate(Class container_class, WTUser user, WTContainerRef parent_ref)
          Throws an exception if the given user cannot create a container in the given parent container.
 void checkIdentity(WTContainer container)
          Throws a UniquenessException if a container with the same name and parent as the given container already exists.
 WTContainer create(WTContainer container)
          Finds an appropriate WTContainerCreator for the given container and calls create().
 WTContainer create(WTContainer container, String selector)
          Finds an appropriate WTContainerCreator for the given container and calls create().
 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.
private  WTGroup getAdministratorsReadOnly(WTContainerRef container_ref)
           
 AdminDomainRef getBasePublicDomain(OrgContainer container, Class container_class)
          Returns the root public domain for containers of the given class.
 WTContainerRef getByInternetDomain(String domain_name)
          

Supported API: false
 WTContainerRef getByPath(String path)
          Finds a container based on a path.
 WTLibrary getClassicContainer()
          Returns a cached, read-only instance of the installation's classic container.
 WTContainerRef getClassicRef()
          Returns a cached, inflated, read-only reference to the installation's classic container.
 String getConceptualClassname()
          Deprecated.  
 QueryResult getContainers(ContainerSpec spec)
          Gets the containers specified in the ContainerSpec.
 DirectoryContextProvider getContextProvider(WTContainer container)
          Returns the DirectoryContextProvider associated with the given container.
 DirectoryContextProvider getContextProvider(WTContainerRef container_ref)
          Returns the DirectoryContextProvider associated with the given container.
 CreatorsMap getCreatorsMap(OrgContainer container)
          

Supported API: false
 ScheduleQueue getDeleteQueue()
          Gets the ScheduleQueue used for deleting and restoring the contents of a container when the container is deleted or restored.
 ExchangeContainer getExchangeContainer()
          Returns a cached, read-only instance of the installation's exchange (site) container.
 WTContainerRef getExchangeRef()
          Returns a cached, inflated, read-only reference to the installation's exchange (site) container.
 String getInternetDomain(WTContainer container)
          Returns the name of the internet domain associated with the given container, for example "com.ptc".
 String getInternetDomain(WTContainerRef container_ref)
          Returns the name of the internet domain associated with the given container, for example "com.ptc".
 WTContainer getNamespace(Class contained_class, WTContainer new_container)
          Get the namespace for objects of the given class in the given container.
 WTContainer getNamespace(WTContained contained)
          Deprecated. Replaced by getNamespace(Class)
 WTContainer getNamespace(WTContained contained, WTContainer new_container)
          Deprecated. Replaced by getNamespace(Class, WTContainer)
 WTOrganization getOrganization(Object requestor)
          Provides a delegation point to handle situations where the application requires that a WTOrganization exist.
 OrgContainer getOrgContainer(WTContained contained)
          Finds the first parent of the given container that is an OrgContainer.
 OrgContainer getOrgContainer(WTOrganization wt_org)
          Find the OrgContainer for a WTOrganization

Supported API: false
 WTContainerRef getOrgContainerRef(WTContained contained)
          Finds the first parent of the given container that is an OrgContainer.
 WTContainerRef getOrgContainerRef(WTOrganization wt_org)
          Find the OrgContainer for a WTOrganization

Supported API: false
 PrincipalQueryResult getPrincipals(PrincipalSpec spec)
          Deprecated. Replaced by DirectoryHelperSvr.queryPrincipals

Finds principals in the public context of the given container, as defined in the PrincipalSpec parameter object.

 DirectoryContextProvider getPublicContextProvider(WTContainer container, Class principal_class)
          Deprecated. Replaced by getPublicContextProviders

Creates DirectoryContextProviders according to the following specification:

OrganizationsGroupsUsers
Site ContainerSelects all principals in all adapters
Windchll PDM ContainerSelects all principals in all adapters
Restricted OrgContainers Selects only the given OrgContainer's organization. Only selects groups in the bundled adapter, underneath the organization's "Public" node Selects users that are members of the organization in all adpaters
Unrestricted OrgContainers Selects only the given OrgContainer's organization. In the bundled adapter, selects groups underneath the organization's "Public" node. In all other adapters, selects all groups. Selects all users in all adapters
ContainerTeamManaged containers in restricted OrgContainers Only selects organizations and groups in the default adapter, underneath the containers "accessGroups" node. This node is the root for all of the container's role groups. Selects users that are members of the container's organization in all adapters
ContainerTeamManaged containers in unrestricted OrgContainers In the bundled adapter, selects groups and organizations underneath the container's "accessGroups" node. This node is the root for all of the container's role groups. In all other adapters, selects all groups. Selects all users in all adpaters
private  DirectoryContextProvider getPublicContextProvider(WTContainer container, Class principal_class, boolean restrict)
           
 DirectoryContextProvider[] getPublicContextProviders(PrincipalSpec spec)
          Returns an array of DirectoryContextProviders that select a set of principals appropriate for display in clients.
 AdminDomainRef getPublicDomainRef(OrgContainer container, Class container_class, String domain_path)
          Gets the public domain for the given container class.
 PublicDomainSet getPublicDomains(OrgContainer container, Class container_class)
          Finds all domains that can be used for a child container's publicParentDomain property.
 DirectorySubtree getSubtree(WTContainer container)
          Get a DirectorySubtree representing the path to the root directory node corresponding to the given container.
private  StandardWTContainerService.DomainInfo getUnusedDomainInfo(String name, AdminDomainRef parent_domain_ref)
           
 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 isAdministrator(WTContainerRef container_ref, WTPrincipal user)
          Determines if a user is an administrator of a container.
 boolean isAdministrator(WTContainerRef container_ref, WTPrincipal user, boolean lookup)
          Determines if a user is an administrator of a container.
 boolean isDescendedFrom(WTContainerRef parent_ref, WTContainerRef child_ref)
          Determines if child_ref is a descendent of parent_ref.
 boolean isInApplicationGeneratedDomain(WTOrganization org)
          Determines if the organization is stored in an "org" domain automatically generated by the container service.
private  boolean isRestrictedDirectorySearchScope(WTContainer container)
           
 boolean isRootDomain(AdminDomainRef domain_ref)
          Determines whether the given domain should be considered a root domain for the given container.
 QueryResult lookup(LookupSpec spec)
          Perform the lookup specified in the LookupSpec

Supported API: false
 WTContainer makePrivate(WTContainer container)
          Sets the container's privateAccess property to true.
 WTContainer makePublic(WTContainer container)
          Sets the container's privateAccess property to false.
static StandardWTContainerService newStandardWTContainerService()
          Default factory for the class.
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
 void registerEvents(ManagerService manager_service)
          Register events with the passed ManagerService.
 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.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

DEBUG

private static final boolean DEBUG

LOG

private static final DebugWriter LOG

DOMAIN_ID

protected static final String DOMAIN_ID

exchange

protected ExchangeContainer exchange

deleteManagerEventHandler

private DeleteManagerEventHandler deleteManagerEventHandler

identityServiceEventHandler

private IdentityServiceEventHandler identityServiceEventHandler

persistenceManagerEventHandler

private PersistenceManagerEventHandler persistenceManagerEventHandler

auditServiceEventHandler

private AuditServiceEventHandler auditServiceEventHandler

folderServiceEventHandler

private FolderServiceEventHandler folderServiceEventHandler

workInProgressEventHandler

private WorkInProgressEventHandler workInProgressEventHandler

IS_ADMINISTRATOR_CONTEXT_KEY

protected static final Object IS_ADMINISTRATOR_CONTEXT_KEY

CREATE_PERMISSION

private static final Vector CREATE_PERMISSION

READ_PERMISSION

private static final Vector READ_PERMISSION
Constructor Detail

StandardWTContainerService

public StandardWTContainerService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

registerEvents

public void registerEvents(ManagerService manager_service)
Register events with the passed ManagerService. The default method does nothing, subclasses should provide an overriding implementation.

Supported API: false

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
manager_service -

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Dummy method to be overridden by subclasses. Subclasses should override this method and provide startup processing.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardWTContainerService

public static StandardWTContainerService newStandardWTContainerService()
                                                                throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardWTContainerService
Throws:
WTException

canCreate

public boolean canCreate(Class container_class,
                         WTUser user)
                  throws WTException
Uses a CanCreateDelegate to determine if the user can create a container of type container_class in their organization's OrgContainer.

Supported API: false

Specified by:
canCreate in interface WTContainerService
Parameters:
container_class -
user -
Returns:
boolean
Throws:
WTException
See Also:
CanCreateDelegate

canCreate

public boolean canCreate(Class container_class,
                         WTUser user,
                         WTContainerRef parent_ref)
                  throws WTException
Uses a CanCreateDelegate to determine if the given user can create an instance of the given container class in the given container.

Supported API: false

Specified by:
canCreate in interface WTContainerService
Parameters:
container_class -
user -
parent_ref -
Returns:
boolean
Throws:
WTException
See Also:
CanCreateDelegate

changePublicParentDomain

public WTContainer changePublicParentDomain(WTContainer container,
                                            AdminDomainRef new_parent)
                                     throws WTException
Changes a WTContainer's publicParentDomain property. The new domain must be included in those returned by getPublicDomains for the container's OrgContainer

Supported API: false

Specified by:
changePublicParentDomain in interface WTContainerService
Parameters:
container -
new_parent -
Returns:
WTContainer
Throws:
WTException

changeRestrictedDirectorySearchScope

public OrgContainer changeRestrictedDirectorySearchScope(OrgContainer container,
                                                         boolean restrict)
                                                  throws WTException
Changes a persistent OrgContainer's restrictedDirectorySearchScope property. If the new value is true, then the container's associated WTOrganization is removed from the site-level All Unrestricted Organizations group. If the new value is false, then the organization is added to the group.

By default, members of the All Unrestricted Organizations group are granted read access to all principals in the User domain or any of its child domains.

Use WTContainerHelper.setRestrictedDirectorySearchScope(OrgContainer,boolean) to assign this value to an unpersisted container.

Supported API: false

Specified by:
changeRestrictedDirectorySearchScope in interface WTContainerService
Parameters:
container -
restrict -
Returns:
OrgContainer
Throws:
WTException
See Also:
OrgContainer.restrictedDirectorySearchScope

checkCreate

public void checkCreate(Class container_class,
                        WTUser user,
                        WTContainerRef parent_ref)
                 throws WTException
Throws an exception if the given user cannot create a container in the given parent container.

Supported API: false

Specified by:
checkCreate in interface WTContainerService
Parameters:
container_class -
user -
parent_ref -
Throws:
WTException
See Also:
CanCreateDelegate

create

public WTContainer create(WTContainer container)
                   throws WTException
Finds an appropriate WTContainerCreator for the given container and calls create().

Supported API: false

Specified by:
create in interface WTContainerService
Parameters:
container -
Returns:
WTContainer
Throws:
WTException
See Also:
WTContainerCreator

create

public WTContainer create(WTContainer container,
                          String selector)
                   throws WTException
Finds an appropriate WTContainerCreator for the given container and calls create().

Supported API: false

Specified by:
create in interface WTContainerService
Parameters:
container -
selector - An optional selector to help pick the appropriate WTContainerCreator.
Returns:
WTContainer
Throws:
WTException
See Also:
WTContainerCreator

getBasePublicDomain

public AdminDomainRef getBasePublicDomain(OrgContainer container,
                                          Class container_class)
                                   throws WTException
Returns the root public domain for containers of the given class. In the OOTB configuration, for products and repositories this will be a domain named "PDM" stored under the container's default domain, and for projects this will be a domain named "Project" stored under the container's default domain.

Supported API: false

Specified by:
getBasePublicDomain in interface WTContainerService
Parameters:
container -
container_class -
Returns:
AdminDomainRef
Throws:
WTException

getByInternetDomain

public WTContainerRef getByInternetDomain(String domain_name)
                                   throws WTException


Supported API: false

Specified by:
getByInternetDomain in interface WTContainerService
Parameters:
domain_name -
Returns:
The container that has the given internet domain name.
Throws:
WTException
See Also:
WTContainer.getInternetDomain()

getByPath

public WTContainerRef getByPath(String path)
                         throws WTException
Finds a container based on a path. The path is of the form:
 path                    ::= path_element (path_element)*
 path_element     ::= '/' class_name '=' container_name
 class_name        ::= the fully qualified name of a container class
 container_name :: = the name of a container instance
 


Supported API: false

Specified by:
getByPath in interface WTContainerService
Parameters:
path -
Returns:
WTContainerRef
Throws:
WTException

getClassicContainer

public WTLibrary getClassicContainer()
                              throws WTException
Returns a cached, read-only instance of the installation's classic container.

Supported API: false

Specified by:
getClassicContainer in interface WTContainerService
Returns:
The installation's ClassicContainer.
Throws:
WTException

getClassicRef

public WTContainerRef getClassicRef()
                             throws WTException
Returns a cached, inflated, read-only reference to the installation's classic container.

Supported API: false

Specified by:
getClassicRef in interface WTContainerService
Returns:
A reference to the installation's ClassicContainer.
Throws:
WTException

getContainers

public QueryResult getContainers(ContainerSpec spec)
                          throws WTException
Gets the containers specified in the ContainerSpec.

Supported API: false

Specified by:
getContainers in interface WTContainerService
Parameters:
spec -
Returns:
QueryResult
Throws:
WTException

getContextProvider

public DirectoryContextProvider getContextProvider(WTContainer container)
                                            throws WTException
Returns the DirectoryContextProvider associated with the given container.

Supported API: false

Specified by:
getContextProvider in interface WTContainerService
Parameters:
container -
Returns:
DirectoryContextProvider
Throws:
WTException
See Also:
WTContainer.getContextProvider()

getContextProvider

public DirectoryContextProvider getContextProvider(WTContainerRef container_ref)
                                            throws WTException
Returns the DirectoryContextProvider associated with the given container.

Supported API: false

Specified by:
getContextProvider in interface WTContainerService
Parameters:
container_ref -
Returns:
DirectoryContextProvider
Throws:
WTException
See Also:
WTContainer.getContextProvider()

getCreatorsMap

public CreatorsMap getCreatorsMap(OrgContainer container)
                           throws WTException


Supported API: false

Specified by:
getCreatorsMap in interface WTContainerService
Parameters:
container -
Returns:
A CreatorsMap for the given container.
Throws:
WTException
See Also:
CreatorsMap

getExchangeContainer

public ExchangeContainer getExchangeContainer()
                                       throws WTException
Returns a cached, read-only instance of the installation's exchange (site) container.

Supported API: false

Specified by:
getExchangeContainer in interface WTContainerService
Returns:
The installation's ExchangeContainer.
Throws:
WTException

getExchangeRef

public WTContainerRef getExchangeRef()
                              throws WTException
Returns a cached, inflated, read-only reference to the installation's exchange (site) container.

Supported API: false

Specified by:
getExchangeRef in interface WTContainerService
Returns:
A reference to the installation's ExchangeContainer.
Throws:
WTException

getInternetDomain

public String getInternetDomain(WTContainerRef container_ref)
                         throws WTException
Returns the name of the internet domain associated with the given container, for example "com.ptc".

This property may be derived from WTOrganization.internetDomain



Supported API: false

Specified by:
getInternetDomain in interface WTContainerService
Parameters:
container_ref -
Returns:
String
Throws:
WTException
See Also:
WTContainer.getInternetDomain(), WTOrganization.getInternetDomain()

getInternetDomain

public String getInternetDomain(WTContainer container)
                         throws WTException
Returns the name of the internet domain associated with the given container, for example "com.ptc".

This property may be derived from WTOrganization.internetDomain



Supported API: false

Specified by:
getInternetDomain in interface WTContainerService
Parameters:
container -
Returns:
String
Throws:
WTException
See Also:
WTContainer.getInternetDomain(), WTOrganization.getInternetDomain()

getNamespace

public WTContainer getNamespace(WTContained contained)
                         throws WTException
Deprecated. Replaced by getNamespace(Class)



Supported API: false

Specified by:
getNamespace in interface WTContainerService
Parameters:
contained -
Returns:
WTContainer
Throws:
WTException

getNamespace

public WTContainer getNamespace(WTContained contained,
                                WTContainer new_container)
                         throws WTException
Deprecated. Replaced by getNamespace(Class, WTContainer)



Supported API: false

Specified by:
getNamespace in interface WTContainerService
Parameters:
contained -
new_container -
Returns:
WTContainer
Throws:
WTException

getNamespace

public WTContainer getNamespace(Class contained_class,
                                WTContainer new_container)
                         throws WTException
Get the namespace for objects of the given class in the given container. WTContained must be assignable from the class.

Supported API: false

Specified by:
getNamespace in interface WTContainerService
Parameters:
contained_class -
new_container -
Returns:
WTContainer
Throws:
WTException

getOrgContainer

public OrgContainer getOrgContainer(WTContained contained)
                             throws WTException
Finds the first parent of the given container that is an OrgContainer.

Supported API: false

Specified by:
getOrgContainer in interface WTContainerService
Parameters:
contained - The contained object to find an OrgContainer for.
Returns:
OrgContainer
Throws:
WTException

getOrgContainer

public OrgContainer getOrgContainer(WTOrganization wt_org)
                             throws WTException
Find the OrgContainer for a WTOrganization

Supported API: false

Specified by:
getOrgContainer in interface WTContainerService
Parameters:
wt_org -
Returns:
The associated OrgContainer, or null if one can't be found
Throws:
WTException

getOrgContainerRef

public WTContainerRef getOrgContainerRef(WTContained contained)
                                  throws WTException
Finds the first parent of the given container that is an OrgContainer.

Supported API: false

Specified by:
getOrgContainerRef in interface WTContainerService
Parameters:
contained -
Returns:
A reference to the OrgContainer
Throws:
WTException

getOrgContainerRef

public WTContainerRef getOrgContainerRef(WTOrganization wt_org)
                                  throws WTException
Find the OrgContainer for a WTOrganization

Supported API: false

Specified by:
getOrgContainerRef in interface WTContainerService
Parameters:
wt_org -
Returns:
A reference to the associated OrgContainer, or null if one can't be found
Throws:
WTException

getPrincipals

public PrincipalQueryResult getPrincipals(PrincipalSpec spec)
                                   throws WTException
Deprecated. Replaced by DirectoryHelperSvr.queryPrincipals

Finds principals in the public context of the given container, as defined in the PrincipalSpec parameter object.



Supported API: false

Specified by:
getPrincipals in interface WTContainerService
Parameters:
spec -
Returns:
A PrincipalQueryResult containing the resulting principals.
Throws:
WTException

getPublicContextProvider

public DirectoryContextProvider getPublicContextProvider(WTContainer container,
                                                         Class principal_class)
                                                  throws WTException
Deprecated. Replaced by getPublicContextProviders

Creates DirectoryContextProviders according to the following specification:

OrganizationsGroupsUsers
Site ContainerSelects all principals in all adapters
Windchll PDM ContainerSelects all principals in all adapters
Restricted OrgContainers Selects only the given OrgContainer's organization. Only selects groups in the bundled adapter, underneath the organization's "Public" node Selects users that are members of the organization in all adpaters
Unrestricted OrgContainers Selects only the given OrgContainer's organization. In the bundled adapter, selects groups underneath the organization's "Public" node. In all other adapters, selects all groups. Selects all users in all adapters
ContainerTeamManaged containers in restricted OrgContainers Only selects organizations and groups in the default adapter, underneath the containers "accessGroups" node. This node is the root for all of the container's role groups. Selects users that are members of the container's organization in all adapters
ContainerTeamManaged containers in unrestricted OrgContainers In the bundled adapter, selects groups and organizations underneath the container's "accessGroups" node. This node is the root for all of the container's role groups. In all other adapters, selects all groups. Selects all users in all adpaters



Supported API: false

Specified by:
getPublicContextProvider in interface WTContainerService
Parameters:
container -
principal_class -
Returns:
DirectoryContextProvider
Throws:
WTException

getPublicContextProviders

public DirectoryContextProvider[] getPublicContextProviders(PrincipalSpec spec)
                                                     throws WTException
Returns an array of DirectoryContextProviders that select a set of principals appropriate for display in clients. The following table presents the results of getPublicContextProviders given an input container reference and principal class.

Notes on the table:

Organizations Groups Users
Site Container A single context provider with no search filter in any service. A single context provider that searches with one level scope beneath the base DN of the bundled adapter. No search filter for other services. A single context provider with no search filter in any service.

If filterByOrganization is true, then only users with a matching "o" attribute or from a supporting service are selected.

Organization Container
  1. A context that selects groups with one level scope beneath the organization's "Public" node in the bundled adapter. No search filter in other services.
  2. The site-level context for groups.
Application Container
  1. A context that selects groups with subtree scope beneath the container's "accessGroups" node in the bundled adapter. No search filter in other services.
  2. The org-level context for groups.
  3. The site-level context for groups.
Classic Container
  1. A context that selects groups with subtree scope beneath the container's root node in the bundled adapter. No search filter in other services.
  2. The org-level context for groups.
  3. The site-level context for groups.



Supported API: false

Specified by:
getPublicContextProviders in interface WTContainerService
Parameters:
spec -
Returns:
DirectoryContextProvider[]
Throws:
WTException
See Also:
PrincipalSpec, wt#org#DirectoryContextProvider

getPublicDomainRef

public AdminDomainRef getPublicDomainRef(OrgContainer container,
                                         Class container_class,
                                         String domain_path)
                                  throws WTException
Gets the public domain for the given container class. The domain path should be relative to the base public domain. For example, if the domain structure in an org is
 /Root/Default/Project/HR/Arden
 Hills
, then the way to get the "Arden Hills" domain would be:
getPublicDomain(org, Project2.class, "/HR/Arden Hills")
.

 

Supported API: false

Specified by:
getPublicDomainRef in interface WTContainerService
Parameters:
container -
container_class -
domain_path -
Returns:
AdminDomainRef
Throws:
WTException

getPublicDomains

public PublicDomainSet getPublicDomains(OrgContainer container,
                                        Class container_class)
                                 throws WTException
Finds all domains that can be used for a child container's publicParentDomain property. This includes the container's base domain for the given container class, as well as all children of the base domain that are also in the container.

Supported API: false

Specified by:
getPublicDomains in interface WTContainerService
Parameters:
container -
container_class -
Returns:
PublicDomainSet
Throws:
WTException

getSubtree

public DirectorySubtree getSubtree(WTContainer container)
                            throws WTException
Get a DirectorySubtree representing the path to the root directory node corresponding to the given container.

Supported API: false

Specified by:
getSubtree in interface WTContainerService
Parameters:
container -
Returns:
DirectorySubtree
Throws:
WTException
See Also:
DirectorySubtree, getContextProvider(wt.inf.container.WTContainer)

isAdministrator

public boolean isAdministrator(WTContainerRef container_ref,
                               WTPrincipal user)
                        throws WTException
Determines if a user is an administrator of a container. Calls isAdministrator(WTContainerRef,WTPrincipal,boolean) with lookup set to true.

Supported API: false

Specified by:
isAdministrator in interface WTContainerService
Parameters:
container_ref -
user -
Returns:
boolean
Throws:
WTException

isAdministrator

public boolean isAdministrator(WTContainerRef container_ref,
                               WTPrincipal user,
                               boolean lookup)
                        throws WTException
Determines if a user is an administrator of a container. Returns true if the user is a member of the container's administrators group. If lookup is true, will also return true if the user is in the administrators group of any of the container's ancestors.

Supported API: false

Specified by:
isAdministrator in interface WTContainerService
Parameters:
container_ref -
user -
lookup -
Returns:
boolean
Throws:
WTException
See Also:
WTContainer.getAdministrators()

isDescendedFrom

public boolean isDescendedFrom(WTContainerRef parent_ref,
                               WTContainerRef child_ref)
                        throws WTException
Determines if child_ref is a descendent of parent_ref.

Supported API: false

Specified by:
isDescendedFrom in interface WTContainerService
Parameters:
parent_ref -
child_ref -
Returns:
boolean
Throws:
WTException

isRootDomain

public boolean isRootDomain(AdminDomainRef domain_ref)
                     throws WTException
Determines whether the given domain should be considered a root domain for the given container. The domain is a root domain if the domain's parent is stored in a different container than the domain itself. This API is used to determine whether access control rules need to be programmatically added to the domain.

Supported API: false

Specified by:
isRootDomain in interface WTContainerService
Parameters:
domain_ref -
Returns:
boolean
Throws:
WTException

lookup

public QueryResult lookup(LookupSpec spec)
                   throws WTException
Perform the lookup specified in the LookupSpec

Supported API: false

Specified by:
lookup in interface WTContainerService
Parameters:
spec -
Returns:
QueryResult
Throws:
WTException
See Also:
LookupSpec

makePrivate

public WTContainer makePrivate(WTContainer container)
                        throws WTException
Sets the container's privateAccess property to true. In addition, reparents the container's defaultDomain to point to the org container's privateDomain.

Supported API: false

Specified by:
makePrivate in interface WTContainerService
Parameters:
container -
Returns:
WTContainer
Throws:
WTException

makePublic

public WTContainer makePublic(WTContainer container)
                       throws WTException
Sets the container's privateAccess property to false. In addition, reparents the container's defaultDomain to point to the domain stored in the container's publicParentDomain property.

Supported API: false

Specified by:
makePublic in interface WTContainerService
Parameters:
container -
Returns:
WTContainer
Throws:
WTException

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

Specified by:
checkIdentity in interface WTContainerServiceSvr
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

Specified by:
createExchange in interface WTContainerServiceSvr
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

Specified by:
getDeleteQueue in interface WTContainerServiceSvr
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: false

Specified by:
getOrganization in interface WTContainerServiceSvr
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

Specified by:
getUnusedDomainName in interface WTContainerServiceSvr
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

Specified by:
isInApplicationGeneratedDomain in interface WTContainerServiceSvr
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

Specified by:
exists in interface WTContainerServiceSvr
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

Specified by:
save in interface WTContainerServiceSvr
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

Specified by:
setClassic in interface WTContainerServiceSvr
Parameters:
classic -
Throws:
WTException

getPublicContextProvider

private final DirectoryContextProvider getPublicContextProvider(WTContainer container,
                                                                Class principal_class,
                                                                boolean restrict)
                                                         throws WTException
Throws:
WTException

isRestrictedDirectorySearchScope

private final boolean isRestrictedDirectorySearchScope(WTContainer container)
                                                throws WTException
Throws:
WTException

getUnusedDomainInfo

private StandardWTContainerService.DomainInfo getUnusedDomainInfo(String name,
                                                                  AdminDomainRef parent_domain_ref)
                                                           throws WTException
Throws:
WTException

getAdministratorsReadOnly

private WTGroup getAdministratorsReadOnly(WTContainerRef container_ref)
                                   throws WTException
Throws:
WTException

addPermissionForCheckout

protected static void addPermissionForCheckout(WTCollection targetCollection)
                                        throws WTException
Throws:
WTException