wt.admin
Class DomainAdministeredHelper

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

public class DomainAdministeredHelper
extends Object
implements Externalizable

The DomainAdministeredHelper class provides methods for manipulating the administrative domain reference information held by objects that implement the DomainAdministered interface.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
DomainAdministeredHelper()
           
 
Method Summary
static void copyDomain(DomainAdministered from_obj, DomainAdministered to_obj)
          Copy the domain of one object to another.
static AdministrativeDomain getAdminDomain(DomainAdministered obj)
          Returns the administrative domain of the object.
static AdminDomainRef getAdminDomainRef(DomainAdministered obj)
          Returns a reference to the administrative domain of the object.
static SearchCondition getSearchCondition(AdministrativeDomain domain)
          Constructs and returns a search condition that can be used to retrieve all objects belonging to the domain passed as argument.
 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(DomainAdministeredHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static boolean sameAdministrativeDomain(DomainAdministered obj1, DomainAdministered obj2)
          Returns true if both objects are in the same AdministrativeDomain.
static DomainAdministered setAdminDomain(DomainAdministered obj, AdminDomainRef domain_ref)
          Sets the administrative domain of the object to the one whose reference is passed as argument.
static DomainAdministered setAdminDomain(DomainAdministered obj, AdministrativeDomain domain)
          Sets the administrative domain of the object to the one passed as argument.
 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

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
Constructor Detail

DomainAdministeredHelper

public DomainAdministeredHelper()
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(DomainAdministeredHelper 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

setAdminDomain

public static DomainAdministered setAdminDomain(DomainAdministered obj,
                                                AdministrativeDomain domain)
                                         throws WTException
Sets the administrative domain of the object to the one passed as argument.

Supported API: true

Parameters:
obj -
domain -
Returns:
DomainAdministered
Throws:
WTRuntimeException - If the object is Persistable and is already Persistent.
WTException
See Also:
AdministrativeDomainManager.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref), AdministrativeDomainManager.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref, boolean inheritedDomain), AdministrativeDomainManagerSvr.replaceAdministrativeDomain(DomainAdministered from, DomainAdministered to, boolean commit_change)

setAdminDomain

public static DomainAdministered setAdminDomain(DomainAdministered obj,
                                                AdminDomainRef domain_ref)
                                         throws WTException
Sets the administrative domain of the object to the one whose reference is passed as argument.

Supported API: true

Parameters:
obj -
domain_ref -
Returns:
DomainAdministered
Throws:
WTRuntimeException - If the object is Persistable and is already Persistent.
WTException
See Also:
AdministrativeDomainManager.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref), AdministrativeDomainManager.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref, boolean inheritedDomain), AdministrativeDomainManagerSvr.replaceAdministrativeDomain(DomainAdministered from, DomainAdministered to, boolean commit_change)

getAdminDomain

public static AdministrativeDomain getAdminDomain(DomainAdministered obj)
                                           throws WTException
Returns the administrative domain of the object.

Supported API: true

Parameters:
obj -
Returns:
AdministrativeDomain
Throws:
WTException

getAdminDomainRef

public static AdminDomainRef getAdminDomainRef(DomainAdministered obj)
                                        throws WTException
Returns a reference to the administrative domain of the object.

Supported API: true

Parameters:
obj -
Returns:
AdminDomainRef
Throws:
WTException

getSearchCondition

public static SearchCondition getSearchCondition(AdministrativeDomain domain)
                                          throws WTException
Constructs and returns a search condition that can be used to retrieve all objects belonging to the domain passed as argument.

Supported API: true

Parameters:
domain -
Returns:
SearchCondition
Throws:
WTException

copyDomain

public static void copyDomain(DomainAdministered from_obj,
                              DomainAdministered to_obj)
                       throws WTException
Copy the domain of one object to another.

Supported API: true

Parameters:
from_obj -
to_obj -
Throws:
WTException

sameAdministrativeDomain

public static boolean sameAdministrativeDomain(DomainAdministered obj1,
                                               DomainAdministered obj2)
                                        throws WTException
Returns true if both objects are in the same AdministrativeDomain.

Supported API: true

Parameters:
obj1 -
obj2 -
Returns:
boolean
Throws:
WTException