org.kuali.rice.kim.api.identity.principal
Class Principal.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.identity.principal.Principal.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Versioned, ModelBuilder, PrincipalContract
Enclosing class:
Principal

public static final class Principal.Builder
extends Object
implements Serializable, ModelBuilder, PrincipalContract

A builder which can be used to construct Principal instances. Enforces the constraints of the PrincipalContract.

See Also:
Serialized Form

Method Summary
 Principal build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Principal.Builder create(PrincipalContract contract)
           
static Principal.Builder create(String principalName)
           
 String getEntityId()
          Gets this PrincipalContract's identity id.
 String getObjectId()
          Return the globally unique object id of this object.
 String getPassword()
          Gets this PrincipalContract's password.
 String getPrincipalId()
          Gets this PrincipalContract's id.
 String getPrincipalName()
          Gets this PrincipalContract's name.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setEntityId(String entityId)
           
 void setObjectId(String objectId)
           
 void setPassword(String password)
           
 void setPrincipalId(String principalId)
           
 void setPrincipalName(String principalName)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Principal.Builder create(String principalName)

create

public static Principal.Builder create(PrincipalContract contract)

build

public Principal build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null

getPassword

public String getPassword()
Description copied from interface: PrincipalContract
Gets this PrincipalContract's password.

Specified by:
getPassword in interface PrincipalContract
Returns:
the password for this PrincipalContract, or null if none has been assigned.

getPrincipalId

public String getPrincipalId()
Description copied from interface: PrincipalContract
Gets this PrincipalContract's id.

Specified by:
getPrincipalId in interface PrincipalContract
Returns:
the id for this PrincipalContract, or null if none has been assigned.

getPrincipalName

public String getPrincipalName()
Description copied from interface: PrincipalContract
Gets this PrincipalContract's name.

Specified by:
getPrincipalName in interface PrincipalContract
Returns:
the name for this PrincipalContract, this value cannot be null.

getEntityId

public String getEntityId()
Description copied from interface: PrincipalContract
Gets this PrincipalContract's identity id.

Specified by:
getEntityId in interface PrincipalContract
Returns:
the identity id for this PrincipalContract, or null if none has been assigned.

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet

setPassword

public void setPassword(String password)

setPrincipalId

public void setPrincipalId(String principalId)

setPrincipalName

public void setPrincipalName(String principalName)

setEntityId

public void setEntityId(String entityId)

setActive

public void setActive(boolean active)

setVersionNumber

public void setVersionNumber(Long versionNumber)

setObjectId

public void setObjectId(String objectId)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.