org.opennms.netmgt.config.groups
Class Role

java.lang.Object
  extended by org.opennms.netmgt.config.groups.Role
All Implemented Interfaces:
Serializable

public class Role
extends Object
implements Serializable

Class Role.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Role()
           
 
Method Summary
 void addSchedule(int index, Schedule vSchedule)
           
 void addSchedule(Schedule vSchedule)
           
 Enumeration<Schedule> enumerateSchedule()
          Method enumerateSchedule.
 String getDescription()
          Returns the value of field 'description'.
 String getMembershipGroup()
          Returns the value of field 'membershipGroup'.
 String getName()
          Returns the value of field 'name'.
 Schedule[] getSchedule()
          Method getSchedule.Returns the contents of the collection in an Array.
 Schedule getSchedule(int index)
          Method getSchedule.
 List<Schedule> getScheduleCollection()
          Method getScheduleCollection.Returns a reference to '_scheduleList'.
 int getScheduleCount()
          Method getScheduleCount.
 String getSupervisor()
          Returns the value of field 'supervisor'.
 boolean isValid()
          Method isValid.
 Iterator<Schedule> iterateSchedule()
          Method iterateSchedule.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllSchedule()
           
 boolean removeSchedule(Schedule vSchedule)
          Method removeSchedule.
 Schedule removeScheduleAt(int index)
          Method removeScheduleAt.
 void setDescription(String description)
          Sets the value of field 'description'.
 void setMembershipGroup(String membershipGroup)
          Sets the value of field 'membershipGroup'.
 void setName(String name)
          Sets the value of field 'name'.
 void setSchedule(int index, Schedule vSchedule)
           
 void setSchedule(List<Schedule> vScheduleList)
          Sets the value of '_scheduleList' by copying the given Vector.
 void setSchedule(Schedule[] vScheduleArray)
           
 void setScheduleCollection(List<Schedule> scheduleList)
          Deprecated.  
 void setSupervisor(String supervisor)
          Sets the value of field 'supervisor'.
static Role unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Role

public Role()
Method Detail

addSchedule

public void addSchedule(Schedule vSchedule)
                 throws IndexOutOfBoundsException
Parameters:
vSchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addSchedule

public void addSchedule(int index,
                        Schedule vSchedule)
                 throws IndexOutOfBoundsException
Parameters:
index -
vSchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateSchedule

public Enumeration<Schedule> enumerateSchedule()
Method enumerateSchedule.

Returns:
an Enumeration over all possible elements of this collection

getDescription

public String getDescription()
Returns the value of field 'description'.

Returns:
the value of field 'Description'.

getMembershipGroup

public String getMembershipGroup()
Returns the value of field 'membershipGroup'.

Returns:
the value of field 'MembershipGroup'.

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getSchedule

public Schedule getSchedule(int index)
                     throws IndexOutOfBoundsException
Method getSchedule.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.groups.Schedule at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getSchedule

public Schedule[] getSchedule()
Method getSchedule.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getScheduleCollection

public List<Schedule> getScheduleCollection()
Method getScheduleCollection.Returns a reference to '_scheduleList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getScheduleCount

public int getScheduleCount()
Method getScheduleCount.

Returns:
the size of this collection

getSupervisor

public String getSupervisor()
Returns the value of field 'supervisor'.

Returns:
the value of field 'Supervisor'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateSchedule

public Iterator<Schedule> iterateSchedule()
Method iterateSchedule.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllSchedule

public void removeAllSchedule()

removeSchedule

public boolean removeSchedule(Schedule vSchedule)
Method removeSchedule.

Parameters:
vSchedule -
Returns:
true if the object was removed from the collection.

removeScheduleAt

public Schedule removeScheduleAt(int index)
Method removeScheduleAt.

Parameters:
index -
Returns:
the element removed from the collection

setDescription

public void setDescription(String description)
Sets the value of field 'description'.

Parameters:
description - the value of field 'description'.

setMembershipGroup

public void setMembershipGroup(String membershipGroup)
Sets the value of field 'membershipGroup'.

Parameters:
membershipGroup - the value of field 'membershipGroup'.

setName

public void setName(String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

setSchedule

public void setSchedule(int index,
                        Schedule vSchedule)
                 throws IndexOutOfBoundsException
Parameters:
index -
vSchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setSchedule

public void setSchedule(Schedule[] vScheduleArray)
Parameters:
vScheduleArray -

setSchedule

public void setSchedule(List<Schedule> vScheduleList)
Sets the value of '_scheduleList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vScheduleList - the Vector to copy.

setScheduleCollection

public void setScheduleCollection(List<Schedule> scheduleList)
Deprecated. 

Sets the value of '_scheduleList' by setting it to the given Vector. No type checking is performed.

Parameters:
scheduleList - the Vector to set.

setSupervisor

public void setSupervisor(String supervisor)
Sets the value of field 'supervisor'.

Parameters:
supervisor - the value of field 'supervisor'.

unmarshal

public static Role unmarshal(Reader reader)
                      throws org.exolab.castor.xml.MarshalException,
                             org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.groups.Role
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright ? 2008. All Rights Reserved.