org.biomage.AuditAndSecurity
Class Security

java.lang.Object
  extended by org.biomage.Common.Extendable
      extended by org.biomage.Common.Describable
          extended by org.biomage.Common.Identifiable
              extended by org.biomage.AuditAndSecurity.Security
All Implemented Interfaces:
SecuredElementItf, java.io.Serializable, HasAuditTrail, HasDescriptions, HasOwner, HasPropertySets, HasSecurity, HasSecurityGroups

public class Security
extends Identifiable
implements java.io.Serializable, HasSecurityGroups, HasOwner

Permission information for an object as to ownership, write and read permissions.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasSecurityGroups
HasSecurityGroups.SecurityGroups_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasOwner
HasOwner.Owner_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasAuditTrail
HasAuditTrail.AuditTrail_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasDescriptions
HasDescriptions.Descriptions_list
 
Nested classes/interfaces inherited from interface org.biomage.Interface.HasPropertySets
HasPropertySets.PropertySets_list
 
Field Summary
protected  java.util.List owner
          The owner of the security rights.
protected  java.util.List securityGroups
          Specifies which security groups have permission to view the associated object.
 
Fields inherited from class org.biomage.Common.Describable
security
 
Fields inherited from class org.biomage.Common.Extendable
editable, id, securedElementId
 
Constructor Summary
Security()
          Default constructor.
Security(org.xml.sax.Attributes atts)
          Attribute constructor.
 
Method Summary
 void addToOwner(Contact contact)
          Method to add Contact to Owner_list
 void addToOwner(int position, Contact contact)
          Method to add Contact at position to Owner_list
 void addToSecurityGroups(int position, SecurityGroup securityGroup)
          Method to add SecurityGroup at position to SecurityGroups_list
 void addToSecurityGroups(SecurityGroup securityGroup)
          Method to add SecurityGroup to SecurityGroups_list
 boolean emptyMAGEobject()
           
 Contact getFromOwner(int position)
          Method to get Contact from Owner_list
 SecurityGroup getFromSecurityGroups(int position)
          Method to get SecurityGroup from SecurityGroups_list
 java.lang.String getModelClassName()
           
 HasOwner.Owner_list getOwner()
          Get method for owner
 HasSecurityGroups.SecurityGroups_list getSecurityGroups()
          Get method for securityGroups
 void removeElementAtFromOwner(int position)
          Method to remove by position from Owner_list
 void removeElementAtFromSecurityGroups(int position)
          Method to remove by position from SecurityGroups_list
 void removeFromOwner(Contact contact)
          Method to remove first Contact from Owner_list
 void removeFromSecurityGroups(SecurityGroup securityGroup)
          Method to remove first SecurityGroup from SecurityGroups_list
 void setAttributes(org.xml.sax.Attributes atts)
           
 void setOwner(HasOwner.Owner_list owner)
          Set method for owner
 void setSecurityGroups(HasSecurityGroups.SecurityGroups_list securityGroups)
          Set method for securityGroups
 void writeAssociations(java.io.Writer out)
          writeAssociations This method is responsible for assembling the association data into XML.
 void writeAttributes(java.io.Writer out)
          writeAttributes This method is responsible for assembling the attribute data into XML.
 void writeMAGEML(java.io.Writer out)
          writeMAGEML This method is responsible for assembling the attribute and association data into XML.
 
Methods inherited from class org.biomage.Common.Identifiable
getIdentifier, getName, setIdentifier, setName, toString
 
Methods inherited from class org.biomage.Common.Describable
addToAuditTrail, addToAuditTrail, addToDescriptions, addToDescriptions, getAuditTrail, getDescriptions, getFromAuditTrail, getFromDescriptions, getSecurity, removeElementAtFromAuditTrail, removeElementAtFromDescriptions, removeFromAuditTrail, removeFromDescriptions, setAuditTrail, setDescriptions, setSecurity
 
Methods inherited from class org.biomage.Common.Extendable
addToPropertySets, addToPropertySets, equals, getFromPropertySets, getId, getIsEditable, getPropertySets, getSecuredElementId, isEditable, removeElementAtFromPropertySets, removeFromPropertySets, setId, setIsEditable, setPropertySets, setSecuredElementId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

owner

protected java.util.List owner
The owner of the security rights.


securityGroups

protected java.util.List securityGroups
Specifies which security groups have permission to view the associated object.

Constructor Detail

Security

public Security()
Default constructor.


Security

public Security(org.xml.sax.Attributes atts)
Attribute constructor. Looks up the attributes in the parameter and casts them from strings appropriately

Parameters:
atts: - the attribute list.
Method Detail

setAttributes

public void setAttributes(org.xml.sax.Attributes atts)
Overrides:
setAttributes in class Identifiable

writeMAGEML

public void writeMAGEML(java.io.Writer out)
                 throws java.io.IOException
writeMAGEML This method is responsible for assembling the attribute and association data into XML. It creates the object tag and then calls the writeAttributes and writeAssociation methods.

Overrides:
writeMAGEML in class Identifiable
Throws:
java.io.IOException

emptyMAGEobject

public boolean emptyMAGEobject()

writeAttributes

public void writeAttributes(java.io.Writer out)
                     throws java.io.IOException
writeAttributes This method is responsible for assembling the attribute data into XML. It calls the super method to write out all attributes of this class and it's ancestors.

Overrides:
writeAttributes in class Identifiable
Throws:
java.io.IOException

writeAssociations

public void writeAssociations(java.io.Writer out)
                       throws java.io.IOException
writeAssociations This method is responsible for assembling the association data into XML. It calls the super method to write out all associations of this class's ancestors.

Overrides:
writeAssociations in class Identifiable
Throws:
java.io.IOException

getModelClassName

public java.lang.String getModelClassName()
Overrides:
getModelClassName in class Identifiable

setOwner

public void setOwner(HasOwner.Owner_list owner)
Set method for owner

Specified by:
setOwner in interface HasOwner
Parameters:
value - to set

getOwner

public HasOwner.Owner_list getOwner()
Get method for owner

Specified by:
getOwner in interface HasOwner
Returns:
value of the attribute

addToOwner

public void addToOwner(Contact contact)
Method to add Contact to Owner_list

Specified by:
addToOwner in interface HasOwner

addToOwner

public void addToOwner(int position,
                       Contact contact)
Method to add Contact at position to Owner_list

Specified by:
addToOwner in interface HasOwner

getFromOwner

public Contact getFromOwner(int position)
Method to get Contact from Owner_list

Specified by:
getFromOwner in interface HasOwner

removeElementAtFromOwner

public void removeElementAtFromOwner(int position)
Method to remove by position from Owner_list

Specified by:
removeElementAtFromOwner in interface HasOwner

removeFromOwner

public void removeFromOwner(Contact contact)
Method to remove first Contact from Owner_list

Specified by:
removeFromOwner in interface HasOwner

setSecurityGroups

public void setSecurityGroups(HasSecurityGroups.SecurityGroups_list securityGroups)
Set method for securityGroups

Specified by:
setSecurityGroups in interface HasSecurityGroups
Parameters:
value - to set

getSecurityGroups

public HasSecurityGroups.SecurityGroups_list getSecurityGroups()
Get method for securityGroups

Specified by:
getSecurityGroups in interface HasSecurityGroups
Returns:
value of the attribute

addToSecurityGroups

public void addToSecurityGroups(SecurityGroup securityGroup)
Method to add SecurityGroup to SecurityGroups_list

Specified by:
addToSecurityGroups in interface HasSecurityGroups

addToSecurityGroups

public void addToSecurityGroups(int position,
                                SecurityGroup securityGroup)
Method to add SecurityGroup at position to SecurityGroups_list

Specified by:
addToSecurityGroups in interface HasSecurityGroups

getFromSecurityGroups

public SecurityGroup getFromSecurityGroups(int position)
Method to get SecurityGroup from SecurityGroups_list

Specified by:
getFromSecurityGroups in interface HasSecurityGroups

removeElementAtFromSecurityGroups

public void removeElementAtFromSecurityGroups(int position)
Method to remove by position from SecurityGroups_list

Specified by:
removeElementAtFromSecurityGroups in interface HasSecurityGroups

removeFromSecurityGroups

public void removeFromSecurityGroups(SecurityGroup securityGroup)
Method to remove first SecurityGroup from SecurityGroups_list

Specified by:
removeFromSecurityGroups in interface HasSecurityGroups