com.openexchange.admin.rmi.dataobjects
Class Context

java.lang.Object
  extended by com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
      extended by com.openexchange.admin.rmi.dataobjects.ExtendableDataObject
          extended by com.openexchange.admin.rmi.dataobjects.Context
All Implemented Interfaces:
NameAndIdObject, Serializable, Cloneable

public class Context
extends ExtendableDataObject
implements NameAndIdObject

Class representing a context.

Author:
Manuel Kraft, Carsten Hoeger, Dennis Sieben
See Also:
Serialized Form

Constructor Summary
Context()
           
Context(Integer id)
           
Context(int id, String name)
           
 
Method Summary
 void addLoginMapping(String mapping)
           
 void addLoginMappings(Collection<String> mapping)
           
 boolean equals(Object obj)
           
 Long getAverage_size()
           
 Boolean getEnabled()
           
 String getFilestore_name()
           
 Integer getFilestoreId()
           
 Integer getId()
          Returns the id of this object
 String getIdAsString()
           
 HashSet<String> getLoginMappings()
           
 MaintenanceReason getMaintenanceReason()
           
 String[] getMandatoryMembersChange()
          At the moment no fields are defined here
 String[] getMandatoryMembersCreate()
          At the moment setId(java.lang.Integer) and setMaxQuota(java.lang.Long) are defined here
 String[] getMandatoryMembersDelete()
          At the moment no fields are defined here
 String[] getMandatoryMembersRegister()
          At the moment no fields are defined here
 Long getMaxQuota()
           
 String getName()
          Returns the name of this object
 Map<String,String> getNamespace(String namespace)
           
 Database getReadDatabase()
           
 Long getUsedQuota()
           
 String getUserAttribute(String namespace, String name)
          Read a generic user attribute
 Map<String,Map<String,String>> getUserAttributes()
           
 Database getWriteDatabase()
           
 int hashCode()
           
 boolean isAverage_sizeset()
           
 Boolean isEnabled()
           
 boolean isEnabledset()
           
 boolean isFilestore_idset()
           
 boolean isFilestore_nameset()
           
 boolean isIdset()
           
 boolean isListrun()
          This settings are only used internally, don't manipulate the setting here or rely on this methods existence
 boolean isMaintenanceReasonset()
           
 boolean isMaxQuotaset()
           
 boolean isNameset()
           
 boolean isReadDatabaseset()
           
 boolean isUsedQuotaset()
           
 boolean isUserAttributesset()
          Used to check if the user attributes have been modified
 boolean isWriteDatabaseset()
           
 boolean removeLoginMapping(String mapping)
           
 boolean removeLoginMappings(Collection<String> mapping)
           
 void setAverage_size(Long average_size)
          The context average size can only be configured in AdminDaemon.properties
 void setEnabled(Boolean enabled)
           
 void setFilestore_name(String filestore_name)
           
 void setFilestoreId(Integer filestore_id)
           
 void setId(Integer id)
          Sets the id for this object
 void setListrun(boolean listrun)
          This settings are only used internally, don't manipulate the setting here or rely on this methods existence
 void setLoginMappings(HashSet<String> mappings)
           
 void setMaintenanceReason(MaintenanceReason maintenanceReason)
           
 void setMaxQuota(Long maxQuota)
           
 void setName(String name)
          Sets the name for this object
 void setReadDatabase(Database readDatabase)
           
 void setUsedQuota(Long usedQuota)
           
 void setUserAttribute(String namespace, String name, String value)
          Sets a generic user attribute
 void setUserAttributes(Map<String,Map<String,String>> userAttributes)
           
 void setWriteDatabase(Database writeDatabase)
           
 String toString()
          
 
Methods inherited from class com.openexchange.admin.rmi.dataobjects.ExtendableDataObject
addExtension, getAllExtensionsAsHash, getFirstExtensionByName, isExtensionsok, isExtensionsset, removeExtension, setExtensionsok
 
Methods inherited from class com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
getUnsetMembers, mandatoryChangeMembersSet, mandatoryCreateMembersSet, mandatoryDeleteMembersSet, mandatoryRegisterMembersSet, testMandatoryCreateFieldsNull
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context()

Context

public Context(Integer id)
Parameters:
id -

Context

public Context(int id,
               String name)
Parameters:
id -
name -
Method Detail

getId

public final Integer getId()
Description copied from interface: NameAndIdObject
Returns the id of this object

Specified by:
getId in interface NameAndIdObject
Returns:
An Integer object containing the id

getIdAsString

public final String getIdAsString()

setId

public final void setId(Integer id)
Description copied from interface: NameAndIdObject
Sets the id for this object

Specified by:
setId in interface NameAndIdObject
Parameters:
id - An Integer object containing the id

getName

public final String getName()
Description copied from interface: NameAndIdObject
Returns the name of this object

Specified by:
getName in interface NameAndIdObject
Returns:
A String containing the name

setName

public final void setName(String name)
Description copied from interface: NameAndIdObject
Sets the name for this object

Specified by:
setName in interface NameAndIdObject
Parameters:
name - A String containing the name

setLoginMappings

public final void setLoginMappings(HashSet<String> mappings)

addLoginMapping

public final void addLoginMapping(String mapping)

addLoginMappings

public final void addLoginMappings(Collection<String> mapping)

removeLoginMapping

public final boolean removeLoginMapping(String mapping)

removeLoginMappings

public final boolean removeLoginMappings(Collection<String> mapping)

getLoginMappings

public final HashSet<String> getLoginMappings()

getFilestoreId

public final Integer getFilestoreId()

setFilestoreId

public final void setFilestoreId(Integer filestore_id)

getMaxQuota

public final Long getMaxQuota()
Returns:
max Quota (in MB)

setMaxQuota

public final void setMaxQuota(Long maxQuota)
Parameters:
maxQuota - (in MB)

getUsedQuota

public final Long getUsedQuota()
Returns:
used Quota (in MB)

setUsedQuota

public final void setUsedQuota(Long usedQuota)

getMaintenanceReason

public final MaintenanceReason getMaintenanceReason()

setMaintenanceReason

public final void setMaintenanceReason(MaintenanceReason maintenanceReason)

isEnabled

public final Boolean isEnabled()

setEnabled

public final void setEnabled(Boolean enabled)

getReadDatabase

public final Database getReadDatabase()

setReadDatabase

public final void setReadDatabase(Database readDatabase)

getWriteDatabase

public final Database getWriteDatabase()

setWriteDatabase

public final void setWriteDatabase(Database writeDatabase)

getAverage_size

public final Long getAverage_size()
Returns:
configured average size (in MB)

setAverage_size

public final void setAverage_size(Long average_size)
The context average size can only be configured in AdminDaemon.properties


getFilestore_name

public final String getFilestore_name()

setFilestore_name

public final void setFilestore_name(String filestore_name)

toString

public String toString()
Description copied from class: EnforceableDataObject

Overrides:
toString in class ExtendableDataObject

getMandatoryMembersChange

public String[] getMandatoryMembersChange()
At the moment no fields are defined here

Specified by:
getMandatoryMembersChange in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersCreate

public String[] getMandatoryMembersCreate()
At the moment setId(java.lang.Integer) and setMaxQuota(java.lang.Long) are defined here

Specified by:
getMandatoryMembersCreate in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersDelete

public String[] getMandatoryMembersDelete()
At the moment no fields are defined here

Specified by:
getMandatoryMembersDelete in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersRegister

public String[] getMandatoryMembersRegister()
At the moment no fields are defined here

Specified by:
getMandatoryMembersRegister in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

isAverage_sizeset

public boolean isAverage_sizeset()
Returns:
the average_sizeset

isEnabledset

public boolean isEnabledset()
Returns:
the enabledset

isFilestore_idset

public boolean isFilestore_idset()
Returns:
the filestore_idset

isFilestore_nameset

public boolean isFilestore_nameset()
Returns:
the filestore_nameset

isIdset

public boolean isIdset()
Returns:
the idset

isMaintenanceReasonset

public boolean isMaintenanceReasonset()
Returns:
the maintenanceReasonset

isMaxQuotaset

public boolean isMaxQuotaset()
Returns:
the maxQuotaset

isNameset

public boolean isNameset()
Returns:
the nameset

isReadDatabaseset

public boolean isReadDatabaseset()
Returns:
the readDatabaseset

isUsedQuotaset

public boolean isUsedQuotaset()
Returns:
the usedQuotaset

isWriteDatabaseset

public boolean isWriteDatabaseset()
Returns:
the writeDatabaseset

setUserAttribute

public void setUserAttribute(String namespace,
                             String name,
                             String value)
Sets a generic user attribute


getUserAttribute

public String getUserAttribute(String namespace,
                               String name)
Read a generic user attribute


getUserAttributes

public Map<String,Map<String,String>> getUserAttributes()

setUserAttributes

public void setUserAttributes(Map<String,Map<String,String>> userAttributes)

getNamespace

public Map<String,String> getNamespace(String namespace)

isUserAttributesset

public boolean isUserAttributesset()
Used to check if the user attributes have been modified


hashCode

public int hashCode()
Overrides:
hashCode in class ExtendableDataObject

equals

public boolean equals(Object obj)
Overrides:
equals in class ExtendableDataObject

getEnabled

public Boolean getEnabled()

isListrun

public final boolean isListrun()
This settings are only used internally, don't manipulate the setting here or rely on this methods existence

Returns:

setListrun

public final void setListrun(boolean listrun)
This settings are only used internally, don't manipulate the setting here or rely on this methods existence

Parameters:
listrun -