wt.admin
Class AdministrativeDomainHelper

java.lang.Object
  extended bywt.admin.AdministrativeDomainHelper
All Implemented Interfaces:
Externalizable, Serializable

public class AdministrativeDomainHelper
extends Object
implements Externalizable

The AdministrativeDomainHelper class facilitates access to the current implementation of the AdministrativeDomainManager interface.

Access to the AdministrativeDomainManager functionality is accomplished using the manager field, for example domain = AdministrativeDomainHelper.manager.getDomain (domainPath, containerRef);

Additionally it holds the names of pre-defined domains and a reference to the root domain.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static String ADMIN_GROUP_NAME
          Constant containing name of the pre-defined default administrators group.
static String ADMIN_GROUP_SERVICE
          Constant containing the name of the directory service that holds the system "Administrators" group.
static String ADMINISTRATOR_NAME
          Constant containing name of the pre-defined default administrator.
private static String CLASSNAME
           
static String DEFAULT_DOMAIN
          Constant containing the name of the pre-defined default domain.
private static AdminDomainRef defaultDomainRef
           
static char DOMAIN_PATH_ESC_CHAR
          Constant containing the Domain path escape character.
static String DOMAIN_PATH_ESC_STR
          Constant containing the Domain path escape character in String form.
static String DOMAIN_SEPARATOR
          Constant containing the separator for domain path components.
static char DOMAIN_SEPARATOR_CHAR
           
static String EVENT_RESOURCE
          Contains the name of the file that holds the mapping between the event keys of interest and their localized displayable identifiers.
static long EXTERNALIZATION_VERSION_UID
           
static AdministrativeDomainManager manager
          Handle to access manager functionality.
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
static String ROOT_DOMAIN
          Constant containing the name of the pre-defined root domain.
private static AdminDomainRef rootDomainRef
           
(package private) static long serialVersionUID
           
static String SYSTEM_DOMAIN
          Constant containing the name of the pre-defined system domain.
private static AdminDomainRef systemDomainRef
           
static String UNAFFILIATED_DOMAIN
          Constant containing the path name of the default domain for principals not affiliated with an organization.
static String USER_DOMAIN
          Constant containing the name of the pre-defined user domain.
private static AdminDomainRef userDomainRef
           
 
Constructor Summary
AdministrativeDomainHelper()
           
 
Method Summary
static String genFullyQualifiedDisplayDomainPath(String containerDisplayPath, String domainPath)
          Returns the Display domain path given a container path in display form and a domain path.
static String genFullyQualifiedDomainPath(String containerExternalPath, String domainPath)
          Returns the External domain path given a container path in external form and a domain path.
static AdminDomainRef getAdminDomainRef(String domain_name)
          Deprecated.  
static AdminDomainRef getGlobalDomainRef(String domain_name)
          Retrieves a reference to one of the four special pre-defined domains (Root, Default, System, and User) in the Exchange container, given its name.
protected static AdminDomainRef getRootDomainRef()
          Gets a reference to the root administrative domain.
static AdminDomainRef getRootDomainReference()
          This is the public form of the method that returns the reference to the root administrative domain.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(AdministrativeDomainHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected static void setRootDomainRef(AdminDomainRef domain_ref)
          Sets a reference to the root administrative domain.
private static void validateDomain(AdministrativeDomain domain)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

manager

public static final AdministrativeDomainManager manager
Handle to access manager functionality.

Supported API: true


ROOT_DOMAIN

public static final String ROOT_DOMAIN
Constant containing the name of the pre-defined root domain.

Supported API: false


DEFAULT_DOMAIN

public static final String DEFAULT_DOMAIN
Constant containing the name of the pre-defined default domain.

Supported API: false


SYSTEM_DOMAIN

public static final String SYSTEM_DOMAIN
Constant containing the name of the pre-defined system domain.

Supported API: false


USER_DOMAIN

public static final String USER_DOMAIN
Constant containing the name of the pre-defined user domain.

Supported API: false


UNAFFILIATED_DOMAIN

public static final String UNAFFILIATED_DOMAIN
Constant containing the path name of the default domain for principals not affiliated with an organization.

Supported API: false


ADMINISTRATOR_NAME

public static final String ADMINISTRATOR_NAME
Constant containing name of the pre-defined default administrator.

Supported API: false


ADMIN_GROUP_NAME

public static final String ADMIN_GROUP_NAME
Constant containing name of the pre-defined default administrators group.

Supported API: false


ADMIN_GROUP_SERVICE

public static final String ADMIN_GROUP_SERVICE
Constant containing the name of the directory service that holds the system "Administrators" group.

Supported API: false


DOMAIN_SEPARATOR

public static final String DOMAIN_SEPARATOR
Constant containing the separator for domain path components.

Supported API: false

See Also:
Constant Field Values

EVENT_RESOURCE

public static final String EVENT_RESOURCE
Contains the name of the file that holds the mapping between the event keys of interest and their localized displayable identifiers.

Supported API: false


DOMAIN_PATH_ESC_CHAR

public static final char DOMAIN_PATH_ESC_CHAR
Constant containing the Domain path escape character.

Supported API: false

See Also:
Constant Field Values

DOMAIN_PATH_ESC_STR

public static final String DOMAIN_PATH_ESC_STR
Constant containing the Domain path escape character in String form.

Supported API: false

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

DOMAIN_SEPARATOR_CHAR

public static final char DOMAIN_SEPARATOR_CHAR
See Also:
Constant Field Values

rootDomainRef

private static AdminDomainRef rootDomainRef

systemDomainRef

private static AdminDomainRef systemDomainRef

defaultDomainRef

private static AdminDomainRef defaultDomainRef

userDomainRef

private static AdminDomainRef userDomainRef
Constructor Detail

AdministrativeDomainHelper

public AdministrativeDomainHelper()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(AdministrativeDomainHelper thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getAdminDomainRef

public static AdminDomainRef getAdminDomainRef(String domain_name)
                                        throws WTException
Deprecated.  

Returns a reference to an administrative domain given its path name.

Supported API: true

Parameters:
domain_name -
Returns:
AdminDomainRef
Throws:
WTException
See Also:
AdministrativeDomainManager.getDomain(String domain_path), AdministrativeDomainManager.getDomain(String domain_path, WTContainerRef container_ref), AdminDomainRef.newAdminDomainRef(AdministrativeDomain domain)

getGlobalDomainRef

public static AdminDomainRef getGlobalDomainRef(String domain_name)
                                         throws WTException
Retrieves a reference to one of the four special pre-defined domains (Root, Default, System, and User) in the Exchange container, given its name. An exception is thrown if any other domain is requested.

Note, when specifying the special pre-defined domains, do not use String literals. Use the AdministrativeDomainHelper constants ROOT_DOMAIN, DEFAULT_DOMAIN, SYSTEM_DOMAIN, and USER_DOMAIN respectively. The special domain names are configurable via properties files. Using the defined constants ensures that the proper String literal values are used for the special domain names.

Supported API: false

Parameters:
domain_name -
Returns:
AdminDomainRef
Throws:
WTException

setRootDomainRef

protected static void setRootDomainRef(AdminDomainRef domain_ref)
Sets a reference to the root administrative domain. This is necessary because of installation, where objects must be created that belong to the root domain.

Supported API: false

Parameters:
domain_ref -

getRootDomainRef

protected static AdminDomainRef getRootDomainRef()
Gets a reference to the root administrative domain.

Supported API: false

Returns:
AdminDomainRef

getRootDomainReference

public static AdminDomainRef getRootDomainReference()
This is the public form of the method that returns the reference to the root administrative domain. Only classes that can't use the protected method getRootDomainRef() should use this method. The protected method sets the root administrative domain reference attribute if it isn't already set and returns it. This method only returns the attribute value regardles of whether or not it is set.

Supported API: false

Returns:
AdminDomainRef

genFullyQualifiedDisplayDomainPath

public static String genFullyQualifiedDisplayDomainPath(String containerDisplayPath,
                                                        String domainPath)
Returns the Display domain path given a container path in display form and a domain path. It is up to the caller to make sure that a display container path is being specified. Also, this method DOES NOT apply access controls to either input path. If access controls should be applied, it is up to the caller to make sure access controls have already been applied to the input path values.

Supported API: false

Parameters:
containerDisplayPath - The container path in Display Form
domainPath - The domain path
Returns:
String

genFullyQualifiedDomainPath

public static String genFullyQualifiedDomainPath(String containerExternalPath,
                                                 String domainPath)
Returns the External domain path given a container path in external form and a domain path. It is up to the caller to make sure that an external container path is being specified.

Supported API: false

Parameters:
containerExternalPath - The container path in External Form
domainPath - The domain path
Returns:
String

validateDomain

private static void validateDomain(AdministrativeDomain domain)
                            throws WTException
Throws:
WTException