org.olat.group
Class BusinessGroupImpl

java.lang.Object
  extended by org.olat.core.commons.persistence.PersistentObject
      extended by org.olat.group.BusinessGroupImpl
All Implemented Interfaces:
java.io.Serializable, CreateInfo, ModifiedInfo, OLATResourceable, Persistable, BusinessGroup

public class BusinessGroupImpl
extends PersistentObject
implements BusinessGroup

Description:
POJO designed class
Implementation for the Interface BusinessGroup.
Initial Date: Jul 27, 2004

Author:
patrick
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.olat.group.BusinessGroup
TYPE_BUDDYGROUP, TYPE_LEARNINGROUP, TYPE_RIGHTGROUP, VALID_GROUPNAME_REGEXP
 
Constructor Summary
BusinessGroupImpl()
          constructs an unitialised BusinessGroup, use setXXX for setting attributes
BusinessGroupImpl(java.lang.String type, java.lang.String groupName, java.lang.String description, SecurityGroup ownerGroup, SecurityGroup partipiciantGroup, SecurityGroup waitingGroup, BGContext groupContext)
          convenience constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares the keys.
 java.lang.Boolean getAutoCloseRanksEnabled()
           
 java.lang.String getDescription()
           
 BGContext getGroupContext()
           
 java.util.Date getLastModified()
           
 java.util.Date getLastUsage()
           
 java.lang.Integer getMaxParticipants()
           
 java.lang.Integer getMinParticipants()
           
 java.lang.String getName()
           
 SecurityGroup getOwnerGroup()
          The BusinessGroup has 1..n Owners acting as administrators .
 SecurityGroup getPartipiciantGroup()
          The BusinessGroup has 0..n Partipiciants.
 java.lang.Long getResourceableId()
           
 java.lang.String getResourceableTypeName()
           
 java.lang.String getType()
           
 SecurityGroup getWaitingGroup()
          The BusinessGroup has 0..n people in the waiting group.
 java.lang.Boolean getWaitingListEnabled()
           
 int hashCode()
           
 void setAutoCloseRanksEnabled(java.lang.Boolean autoCloseRanksEnabled)
           
 void setDescription(java.lang.String descriptionP)
           
 void setGroupContext(BGContext groupContext)
           
 void setLastModified(java.util.Date date)
           
 void setLastUsage(java.util.Date lastUsageP)
          set last usage
 void setMaxParticipants(java.lang.Integer maxParticipants)
           
 void setMinParticipants(java.lang.Integer minParticipants)
           
 void setName(java.lang.String groupName)
           
 void setWaitingGroup(SecurityGroup waitingGroup)
           
 void setWaitingListEnabled(java.lang.Boolean waitingListEnabled)
           
 java.lang.String toString()
           
 
Methods inherited from class org.olat.core.commons.persistence.PersistentObject
equalsByPersistableKey, getCreationDate, getKey
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.olat.core.id.Persistable
equalsByPersistableKey, getKey
 
Methods inherited from interface org.olat.core.id.CreateInfo
getCreationDate
 

Constructor Detail

BusinessGroupImpl

public BusinessGroupImpl()
constructs an unitialised BusinessGroup, use setXXX for setting attributes


BusinessGroupImpl

public BusinessGroupImpl(java.lang.String type,
                         java.lang.String groupName,
                         java.lang.String description,
                         SecurityGroup ownerGroup,
                         SecurityGroup partipiciantGroup,
                         SecurityGroup waitingGroup,
                         BGContext groupContext)
convenience constructor

Parameters:
type -
groupName -
description -
ownerGroup -
partipiciantGroup -
groupContext -
Method Detail

setName

public void setName(java.lang.String groupName)
Specified by:
setName in interface BusinessGroup
Parameters:
groupName -

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface BusinessGroup
Returns:
The group description or NULL if none set.
See Also:
BusinessGroup.getDescription()

setDescription

public void setDescription(java.lang.String descriptionP)
Specified by:
setDescription in interface BusinessGroup
Parameters:
descriptionP - the description of this group. Might be NULL
See Also:
BusinessGroup.setDescription(java.lang.String)

getName

public java.lang.String getName()
Specified by:
getName in interface BusinessGroup
Returns:
The group display name (not system unique)
See Also:
BusinessGroup.getName()

getOwnerGroup

public SecurityGroup getOwnerGroup()
Description copied from interface: BusinessGroup
The BusinessGroup has 1..n Owners acting as administrators .

Specified by:
getOwnerGroup in interface BusinessGroup
Returns:
the owners
See Also:
BusinessGroup.getOwnerGroup()

getPartipiciantGroup

public SecurityGroup getPartipiciantGroup()
Description copied from interface: BusinessGroup
The BusinessGroup has 0..n Partipiciants.

Specified by:
getPartipiciantGroup in interface BusinessGroup
Returns:
the partipiciants
See Also:
BusinessGroup.getPartipiciantGroup()

getWaitingGroup

public SecurityGroup getWaitingGroup()
Description copied from interface: BusinessGroup
The BusinessGroup has 0..n people in the waiting group.

Specified by:
getWaitingGroup in interface BusinessGroup
Returns:
the waiting group
See Also:
BusinessGroup.getWaitingGroup()

getLastUsage

public java.util.Date getLastUsage()
Specified by:
getLastUsage in interface BusinessGroup
Returns:
Returns the lastUsage.

setLastUsage

public void setLastUsage(java.util.Date lastUsageP)
set last usage

Specified by:
setLastUsage in interface BusinessGroup
Parameters:
lastUsageP -

getType

public java.lang.String getType()
Specified by:
getType in interface BusinessGroup
Returns:
The group type identification
See Also:
BusinessGroup.getType()

getResourceableTypeName

public java.lang.String getResourceableTypeName()
Specified by:
getResourceableTypeName in interface OLATResourceable
Returns:
a type name. It must be unique within OLAT. Consider this.getClass().getName() as such a type name.
See Also:
org.olat.core.id.OLATResourceablegetResourceableTypeName()

getResourceableId

public java.lang.Long getResourceableId()
Specified by:
getResourceableId in interface OLATResourceable
Returns:
a number identfiying the instance of this type. if null, then the OLATResourcable is just a type. The value 0 (zero) is not allowed
See Also:
org.olat.core.id.OLATResourceablegetResourceableId()

getGroupContext

public BGContext getGroupContext()
Specified by:
getGroupContext in interface BusinessGroup
Returns:
the business group context for this group
See Also:
BusinessGroup.getGroupContext()

setGroupContext

public void setGroupContext(BGContext groupContext)
Specified by:
setGroupContext in interface BusinessGroup
Parameters:
groupContext - the business group context
See Also:
BusinessGroup.setGroupContext(org.olat.group.context.BGContext)

getMaxParticipants

public java.lang.Integer getMaxParticipants()
Specified by:
getMaxParticipants in interface BusinessGroup
Returns:
the maximal number of participants
See Also:
BusinessGroup.getMaxParticipants()

setMaxParticipants

public void setMaxParticipants(java.lang.Integer maxParticipants)
Specified by:
setMaxParticipants in interface BusinessGroup
Parameters:
maxParticipants - the maximal number of participants
See Also:
BusinessGroup.setMaxParticipants(java.lang.Integer)

getMinParticipants

public java.lang.Integer getMinParticipants()
Specified by:
getMinParticipants in interface BusinessGroup
Returns:
the minimal number of participants
See Also:
BusinessGroup.getMinParticipants()

setMinParticipants

public void setMinParticipants(java.lang.Integer minParticipants)
Specified by:
setMinParticipants in interface BusinessGroup
Parameters:
minParticipants - the minimal number of participants
See Also:
BusinessGroup.setMinParticipants(java.lang.Integer)

toString

public java.lang.String toString()
Overrides:
toString in class PersistentObject
See Also:
Object.toString()

setWaitingGroup

public void setWaitingGroup(SecurityGroup waitingGroup)
Specified by:
setWaitingGroup in interface BusinessGroup
Parameters:
waitingGroup - New waiting group.

getAutoCloseRanksEnabled

public java.lang.Boolean getAutoCloseRanksEnabled()
Specified by:
getAutoCloseRanksEnabled in interface BusinessGroup
Returns:
true: if the waiting list will automaticly close ranks to participant list

setAutoCloseRanksEnabled

public void setAutoCloseRanksEnabled(java.lang.Boolean autoCloseRanksEnabled)
Specified by:
setAutoCloseRanksEnabled in interface BusinessGroup
Parameters:
autoCloseRanksEnabled - true: enable automaticly close ranks form waiting list to participant list.

getWaitingListEnabled

public java.lang.Boolean getWaitingListEnabled()
Specified by:
getWaitingListEnabled in interface BusinessGroup
Returns:
true: if waiting-list is enabled

setWaitingListEnabled

public void setWaitingListEnabled(java.lang.Boolean waitingListEnabled)
Specified by:
setWaitingListEnabled in interface BusinessGroup

equals

public boolean equals(java.lang.Object obj)
Compares the keys.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getLastModified

public java.util.Date getLastModified()
Specified by:
getLastModified in interface ModifiedInfo
Returns:
See Also:
ModifiedInfo.getLastModified()

setLastModified

public void setLastModified(java.util.Date date)
Specified by:
setLastModified in interface ModifiedInfo
See Also:
ModifiedInfo.setLastModified(java.util.Date)