com.ail.core
Class CoreUserImpl

java.lang.Object
  extended by com.ail.core.CoreUserImpl
All Implemented Interfaces:
CoreUser, java.io.Serializable
Direct Known Subclasses:
ConfigurationOwnerImpl

public class CoreUserImpl
extends java.lang.Object
implements CoreUser

Clients of the Core may use an instance of this class to satisfy the Core's callback methods.

Version:
$Revision: 1.6 $
See Also:
Serialized Form

Field Summary
static int SelectConsistentConfigurations
          Whenever CoreUserImpl was instantiated becomes the version effective date for this instance.
static int SelectLatestConfigurations
          The current date will be returned whenever the version effective date is requested.
 
Constructor Summary
CoreUserImpl()
           
CoreUserImpl(CoreUser user)
          Create a new instance based on an existing CoreUser.
CoreUserImpl(int configSelectionFlag)
          Deprecated. Use #CoreUserImpl(int, Principal) instead.
CoreUserImpl(int configSelectionFlag, java.lang.String configurationNamespace, java.security.Principal securityPrincipal)
          Constructor
 
Method Summary
 java.lang.String getConfigurationNamespace()
          Retrieve the configuration namespace used by this class.
 java.security.Principal getSecurityPrincipal()
          Get the security principal associated with this instance.
 VersionEffectiveDate getVersionEffectiveDate()
          The Core uses this callback to determin which versions of artefacts it should use on the CoreUser's behalf.
 void setConfigurationNamespace(java.lang.String configurationNamespace)
           
 void setSecurityPrincipal(java.security.Principal securityPrincipal)
          Set the security principal associated with this instance.
 void setVersionEffectiveDate(VersionEffectiveDate ved)
           
 void setVersionEffecvtiveDateToNow()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SelectLatestConfigurations

public static final int SelectLatestConfigurations
The current date will be returned whenever the version effective date is requested.

See Also:
Constant Field Values

SelectConsistentConfigurations

public static final int SelectConsistentConfigurations
Whenever CoreUserImpl was instantiated becomes the version effective date for this instance.

See Also:
Constant Field Values
Constructor Detail

CoreUserImpl

public CoreUserImpl()

CoreUserImpl

public CoreUserImpl(CoreUser user)
Create a new instance based on an existing CoreUser. The core uses this constructor to build stripped down instance of client's CoreUser to reduce RMI traffic. A client's CoreUser is always passed into the services they use - it's how the service gets to know things about the client. However, client's also often implement CoreUser and pass themselves into the Core constructor. If they do, then we'd end up sending the whole client class across RMI. So the Core uses this constructor to pull the minimum necessary information out of the client's CoreUser and pass that onto the service.

Parameters:
user - The CoreUser to copy properties from.

CoreUserImpl

public CoreUserImpl(int configSelectionFlag)
Deprecated. Use #CoreUserImpl(int, Principal) instead.

Constructor.

Parameters:
configSelectionFlag - Either SelectConsistentConfigurations or SelectLatestConfigurations

CoreUserImpl

public CoreUserImpl(int configSelectionFlag,
                    java.lang.String configurationNamespace,
                    java.security.Principal securityPrincipal)
Constructor

Parameters:
configSelectionFlag - Either SelectConsistentConfigurations or SelectLatestConfigurations
configurationNamespace - Namespace to associate with this core user.
securityPrincipal - Principal to associate with this Core User, this may be null.
Method Detail

getVersionEffectiveDate

public VersionEffectiveDate getVersionEffectiveDate()
The Core uses this callback to determin which versions of artefacts it should use on the CoreUser's behalf.

Specified by:
getVersionEffectiveDate in interface CoreUser
Returns:
The version date that the CoreUser is working at.

setVersionEffecvtiveDateToNow

public void setVersionEffecvtiveDateToNow()

setVersionEffectiveDate

public void setVersionEffectiveDate(VersionEffectiveDate ved)

getSecurityPrincipal

public java.security.Principal getSecurityPrincipal()
Get the security principal associated with this instance.

Specified by:
getSecurityPrincipal in interface CoreUser
Returns:
The associated security principal - if defined, null otherwise.

setSecurityPrincipal

public void setSecurityPrincipal(java.security.Principal securityPrincipal)
Set the security principal associated with this instance.

Parameters:
securityPrincipal - The security principal of this core user

getConfigurationNamespace

public java.lang.String getConfigurationNamespace()
Description copied from interface: CoreUser
Retrieve the configuration namespace used by this class. This namespace is simply a unique string used by the class to identify its configuration.

Specified by:
getConfigurationNamespace in interface CoreUser
Returns:
Namespace string

setConfigurationNamespace

public void setConfigurationNamespace(java.lang.String configurationNamespace)