org.kuali.rice.kim.api.role
Class RoleMember.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.role.RoleMember.Builder
All Implemented Interfaces:
Serializable, Inactivatable, InactivatableFromTo, GloballyUnique, Identifiable, Versioned, ModelBuilder, ModelObjectBasic, ModelObjectComplete, RoleMemberContract
Enclosing class:
RoleMember

public static final class RoleMember.Builder
extends Object
implements ModelBuilder, RoleMemberContract, ModelObjectComplete

See Also:
Serialized Form

Method Summary
 RoleMember build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static RoleMember.Builder create(RoleMemberContract contract)
           
static RoleMember.Builder create(String roleId, String id, String memberId, MemberType memberType, org.joda.time.DateTime activeFromDate, org.joda.time.DateTime activeToDate, Map<String,String> attributes, String memberName, String memberNamespaceCode)
           
 boolean equals(Object obj)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 org.joda.time.DateTime getActiveFromDate()
          Gets the date for which the record become active.
 org.joda.time.DateTime getActiveToDate()
          Gets the date for which the record become inactive.
 Map<String,String> getAttributes()
          This returns specific attributes to be set on a Role Member in order to match permission and responsibilitys.
 String getId()
          The unique identifier for an object.
 String getMemberId()
          This is the member id for the Role Member.
 String getMemberName()
           
 String getMemberNamespaceCode()
           
 String getObjectId()
          Return the globally unique object id of this object.
 String getRoleId()
          This is the id for the Role.
 List<RoleResponsibilityAction.Builder> getRoleRspActions()
          This returns a list of role responsibility actions assigned to a role member
 MemberType getType()
          This is the type code for the Role Member.
 Long getVersionNumber()
          Returns the version number for this object.
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 boolean isActive()
          The active indicator for an object.
 boolean isActive(org.joda.time.DateTime activeAsOfDate)
          Returns if the record is active for a given Time.
 void setActiveFromDate(org.joda.time.DateTime activeFromDate)
           
 void setActiveToDate(org.joda.time.DateTime activeToDate)
           
 void setAttributes(Map<String,String> attributes)
           
 void setId(String id)
           
 void setMemberId(String memberId)
           
 void setMemberName(String memberName)
           
 void setMemberNamespaceCode(String memberNamespaceCode)
           
 void setObjectId(String objectId)
           
 void setRoleId(String roleId)
           
 void setRoleRspActions(List<RoleResponsibilityAction.Builder> roleRspActions)
           
 void setType(MemberType type)
           
 void setVersionNumber(Long versionNumber)
           
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static RoleMember.Builder create(String roleId,
                                        String id,
                                        String memberId,
                                        MemberType memberType,
                                        org.joda.time.DateTime activeFromDate,
                                        org.joda.time.DateTime activeToDate,
                                        Map<String,String> attributes,
                                        String memberName,
                                        String memberNamespaceCode)

create

public static RoleMember.Builder create(RoleMemberContract contract)

build

public RoleMember 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

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

setId

public void setId(String id)

getRoleId

public String getRoleId()
Description copied from interface: RoleMemberContract
This is the id for the Role.

This is a id assigned to a Role. It defines the role this role member belongs to.

Specified by:
getRoleId in interface RoleMemberContract
Returns:
roleId

setRoleId

public void setRoleId(String roleId)

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: RoleMemberContract
This returns specific attributes to be set on a Role Member in order to match permission and responsibilitys. These attributes match the attributes set to a KimType

Specified by:
getAttributes in interface RoleMemberContract
Returns:
attributes

setAttributes

public void setAttributes(Map<String,String> attributes)

getRoleRspActions

public List<RoleResponsibilityAction.Builder> getRoleRspActions()
Description copied from interface: RoleMemberContract
This returns a list of role responsibility actions assigned to a role member

Specified by:
getRoleRspActions in interface RoleMemberContract
Returns:
roleRspActions

setRoleRspActions

public void setRoleRspActions(List<RoleResponsibilityAction.Builder> roleRspActions)

getMemberId

public String getMemberId()
Description copied from interface: RoleMemberContract
This is the member id for the Role Member.

This is a id value that defines the Role Member. This value is either a Principal Id, Group Id, or Role Id depending on the type code

Specified by:
getMemberId in interface RoleMemberContract
Returns:
memberId

setMemberId

public void setMemberId(String memberId)

getType

public MemberType getType()
Description copied from interface: RoleMemberContract
This is the type code for the Role Member.

This is a value that defines the type of Role Member. This value determines whether memberId is either a Principal Id, Group Id, or Role Id

Specified by:
getType in interface RoleMemberContract
Returns:
typeCode

getMemberName

public String getMemberName()
Specified by:
getMemberName in interface RoleMemberContract

setMemberName

public void setMemberName(String memberName)

getMemberNamespaceCode

public String getMemberNamespaceCode()
Specified by:
getMemberNamespaceCode in interface RoleMemberContract

setMemberNamespaceCode

public void setMemberNamespaceCode(String memberNamespaceCode)

setType

public void setType(MemberType type)

getActiveFromDate

public org.joda.time.DateTime getActiveFromDate()
Description copied from interface: InactivatableFromTo
Gets the date for which the record become active. Can be null.

Specified by:
getActiveFromDate in interface InactivatableFromTo
Returns:
Timestamp of active from date

setActiveFromDate

public void setActiveFromDate(org.joda.time.DateTime activeFromDate)

getActiveToDate

public org.joda.time.DateTime getActiveToDate()
Description copied from interface: InactivatableFromTo
Gets the date for which the record become inactive. Can be null.

Specified by:
getActiveToDate in interface InactivatableFromTo
Returns:
Timestamp of active to date

setActiveToDate

public void setActiveToDate(org.joda.time.DateTime activeToDate)

isActive

public boolean isActive(org.joda.time.DateTime activeAsOfDate)
Description copied from interface: InactivatableFromTo
Returns if the record is active for a given Time. If the activeAsOfDate is null will return null.

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

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

setVersionNumber

public void setVersionNumber(Long versionNumber)

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

setObjectId

public void setObjectId(String objectId)

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

equals

public boolean equals(Object obj)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
obj - to object to compare for equality
Returns:
if equal

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation


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