org.kuali.rice.kim.api.group
Class Group.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.group.Group.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelBuilder, GroupContract
Enclosing class:
Group

public static class Group.Builder
extends Object
implements GroupContract, ModelBuilder, Serializable

This builder constructs an Group enforcing the constraints of the GroupContract.

See Also:
Serialized Form

Method Summary
 Group build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Group.Builder create(GroupContract contract)
          creates a Group from an existing GroupContract.
static Group.Builder create(String namespaceCode, String name, String kimTypeId)
          creates a Group with the required fields.
 Map<String,String> getAttributes()
          This is a set of Attributes for a Group.
 String getDescription()
          This a description for the Group.
 String getId()
          The unique identifier for an object.
 String getKimTypeId()
          This a Kim Type Id for the Group.
 String getName()
          This is the name for the Group.
 String getNamespaceCode()
          This is the namespace code for the Group.
 String getObjectId()
          Return the globally unique object id of this object.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setAttributes(Map<String,String> attributes)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setKimTypeId(String kimTypeId)
           
 void setName(String name)
           
 void setNamespaceCode(String namespaceCode)
           
 void setObjectId(String objectId)
           
 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 Group.Builder create(String namespaceCode,
                                   String name,
                                   String kimTypeId)
creates a Group with the required fields.


create

public static Group.Builder create(GroupContract contract)
creates a Group from an existing GroupContract.


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)

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: GroupContract
This is the namespace code for the Group.

This is a namespace code assigned to a Group. Together with name, it makes up another unique identifier for Group

Specified by:
getNamespaceCode in interface GroupContract
Returns:
namespaceCode

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

getName

public String getName()
Description copied from interface: GroupContract
This is the name for the Group.

This is a name assigned to a Group. Together with NamespaceCode, it makes up another unique identifier for Group

Specified by:
getName in interface GroupContract
Returns:
name

setName

public void setName(String name)

getDescription

public String getDescription()
Description copied from interface: GroupContract
This a description for the Group.

This is a description assigned to a Group.

Specified by:
getDescription in interface GroupContract
Returns:
description

setDescription

public void setDescription(String description)

getKimTypeId

public String getKimTypeId()
Description copied from interface: GroupContract
This a Kim Type Id for the Group.

This links a Kim Type to the Group to allow custom types of Groups.

Specified by:
getKimTypeId in interface GroupContract
Returns:
description

setKimTypeId

public void setKimTypeId(String kimTypeId)

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: GroupContract
This is a set of Attributes for a Group.

This is a set of attributes which are key-label pairs that are defined by the Group's Kim Type.

Specified by:
getAttributes in interface GroupContract
Returns:
attributes

setAttributes

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

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.

setActive

public void setActive(boolean active)

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)

build

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


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