7.0 Action Request System Java API

com.remedy.arsys.api
Class Container

java.lang.Object
  extended bycom.remedy.arsys.api.ObjectBase
      extended bycom.remedy.arsys.api.Container
All Implemented Interfaces:
java.lang.Cloneable, IARPersistentObject

public class Container
extends ObjectBase
implements IARPersistentObject, java.lang.Cloneable

Class and methods for container object. Containers are generic lists of references that are used to define guides and applications.


Field Summary
 
Fields inherited from class com.remedy.arsys.api.ObjectBase
m_changeFlags, m_permissionList
 
Constructor Summary
protected Container(java.lang.String name, PermissionInfo[] permissionList, java.lang.String helpText, long lastUpdateTime, java.lang.String owner, java.lang.String lastChangedBy, java.lang.String diaryStr)
           
 
Method Summary
 void activate()
          AR System reserved method.
 void clear()
          Clears all of the references to member objects.
 java.lang.Object clone()
          Clone implementation that returns an Object with data cloned from self.
 void create()
          Creates a new container with the indicated name on the specified server.
 boolean equals(java.lang.Object anObject)
          Use this method for checking equality.
 InternalID[] getAdminGroupList()
          Returns list of zero or more groups who can administer this container (and the referenced objects).
 ContainerOwner[] getContainerOwner()
          Returns the form that owns this container.
 ARServerUser getContext()
           
 char[] getDescription()
          Returns description for this container.
 ContainerKey getKey()
          Returns unique identifier for container.
 char[] getLabel()
          Returns label for this container.
 NameID getNewname()
          Returns new name of the container.
 PropInfo[] getProperties()
          Returns object properties list associated with the container.
 ReferenceBase[] getReferences()
          Returns a list of pointers to the objects referenced by this container.
 boolean getRemoveFlag()
          Returns a flag specifying if invalid object references are removed.
 ContainerType getType()
          Returns the type for this container, either guide (ARCON_GUIDE), application (ARCON_APP), or a custom type you have defined.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 void load()
          Populates this object with information from the AR System server.
 void load(ContainerCriteria criteria)
          Returns the contents of the container with the indicated name with information specified by ContainerCriteria on the specified server.
 void passivate()
          AR System reserved method.
 void remove()
          Deletes the container with the indicated name from the specified server and deletes any references to the container from other containers.
 void setAdminGroupList(InternalID[] adminList)
          Sets list of zero or more groups who can administer this container (and the referenced objects).
 void setContainerOwner(ContainerOwner[] owner)
          Sets the form that owns this container.
 void setContext(ARServerUser ctxt)
          Associates ARServerUser information with this AR System server object.
 void setDeleteOption(int option)
          Sets the delete option indicating the action to take if specified in the container.
 void setDescription(java.lang.String desc)
          Sets description for this container.
 void setKey(ContainerKey key)
          Sets unique identifier for container.
 void setLabel(java.lang.String label)
          Sets label for this container.
 void setNewname(NameID name)
          Sets new name for an existing container.
 void setPermissions(PermissionInfo[] permissions)
          Sets the permissions of the AR System object.
 void setProperties(PropInfo[] props)
          Sets object properties list associated with the container.
 void setReferences(ReferenceBase[] refs)
          Sets a list of pointers to the objects referenced by this container.
 void setRemoveFlag(boolean b)
          A flag specifying if invalid object references are removed.
 void setType(ContainerType type)
          Sets the type for this container? either guide (ARCON_GUIDE), application (ARCON_APP), or a custom type you have defined.
 void store()
          Updates the definition for the container with the indicated name on the specified server.
 void unsetContext()
          Removes the association to a specific user context.
 
Methods inherited from class com.remedy.arsys.api.ObjectBase
getDiary, getHelpText, getLastChangedBy, getLastUpdateTime, getName, getNewName, getOwner, getPermissions, resetChangeFlags, setDiary, setHelpText, setLastChangedBy, setName, setNewName, setOwner
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Container

protected Container(java.lang.String name,
                    PermissionInfo[] permissionList,
                    java.lang.String helpText,
                    long lastUpdateTime,
                    java.lang.String owner,
                    java.lang.String lastChangedBy,
                    java.lang.String diaryStr)
Method Detail

getKey

public ContainerKey getKey()
Returns unique identifier for container.


setKey

public void setKey(ContainerKey key)
Sets unique identifier for container.


setAdminGroupList

public void setAdminGroupList(InternalID[] adminList)
Sets list of zero or more groups who can administer this container (and the referenced objects). If ownerObj is not NULL, this parameter is ignored and the Subadministrator group list of the owning form is used instead. Users must belong to both a specified group and the Subadministrator group to obtain these privileges. Specifying an empty administrator group list defines a container that can be administered by users with administrator capability only. Specifying group ID 0 (Public) provides subadministrator capability to all members of the Subadministrator group.

Parameters:
adminList - An array of InternalID objects

setPermissions

public void setPermissions(PermissionInfo[] permissions)
Description copied from class: ObjectBase
Sets the permissions of the AR System object.

Overrides:
setPermissions in class ObjectBase

getAdminGroupList

public InternalID[] getAdminGroupList()
Returns list of zero or more groups who can administer this container (and the referenced objects).


setLabel

public void setLabel(java.lang.String label)
Sets label for this container.


getLabel

public char[] getLabel()
Returns label for this container.


setDescription

public void setDescription(java.lang.String desc)
Sets description for this container.


getDescription

public char[] getDescription()
Returns description for this container.


getType

public ContainerType getType()
Returns the type for this container, either guide (ARCON_GUIDE), application (ARCON_APP), or a custom type you have defined.


setType

public void setType(ContainerType type)
Sets the type for this container? either guide (ARCON_GUIDE), application (ARCON_APP), or a custom type you have defined.


setReferences

public void setReferences(ReferenceBase[] refs)
Sets a list of pointers to the objects referenced by this container. References can be to ReferenceInfo internal AR System objects (for example, guides reference active links and applications reference forms) or to ExternalReferenceInfo external objects such as URLs or file names.


getReferences

public ReferenceBase[] getReferences()
Returns a list of pointers to the objects referenced by this container. References can be to ReferenceInfo internal AR System objects (for example, guides reference active links and applications reference forms) or to ExternalReferenceInfo external objects such as URLs or file names.


setContainerOwner

public void setContainerOwner(ContainerOwner[] owner)
Sets the form that owns this container. Specify NULL for this parameter if you want the container to exist globally.

Parameters:
owner - ContainerOwner

getContainerOwner

public ContainerOwner[] getContainerOwner()
Returns the form that owns this container.


setProperties

public void setProperties(PropInfo[] props)
Sets object properties list associated with the container. If set to NULL, no object properties list with zero properties will be associated with the container. You can specify the following server object property tags. The following constant values are defined by AR System. If getObjPropList parameter is NULL, a list of zero properties is returned.


getProperties

public PropInfo[] getProperties()
Returns object properties list associated with the container. If set to NULL, a list of zero properties is returned.


setRemoveFlag

public void setRemoveFlag(boolean b)
A flag specifying if invalid object references are removed. If FALSE, references to nonexistent AR System objects will be removed with no error generated. If TRUE, an error will be generated. Specify NULL for this parameter if you do not want to change the flag.


getRemoveFlag

public boolean getRemoveFlag()
Returns a flag specifying if invalid object references are removed.


setNewname

public void setNewname(NameID name)
Sets new name for an existing container. The names of all containers on a given server must be unique. Call store() to save the new name to the server.


getNewname

public NameID getNewname()
Returns new name of the container. This name might not necessarily be the one stored on the server.


setDeleteOption

public void setDeleteOption(int option)
Sets the delete option indicating the action to take if specified in the container.

Parameters:
option - Possible values are:

  • 0: Do not delete the container.
  • 1: Delete the entire block to which the container belongs.

getContext

public ARServerUser getContext()

setContext

public void setContext(ARServerUser ctxt)
Associates ARServerUser information with this AR System server object.

Specified by:
setContext in interface IARPersistentObject

unsetContext

public void unsetContext()
Description copied from interface: IARPersistentObject
Removes the association to a specific user context. This is equal to setContext(null).

Specified by:
unsetContext in interface IARPersistentObject

clear

public void clear()
Clears all of the references to member objects.

Specified by:
clear in interface IARPersistentObject
Overrides:
clear in class ObjectBase

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Overrides:
clone in class ObjectBase
Throws:
java.lang.CloneNotSupportedException

create

public void create()
            throws ARException
Creates a new container with the indicated name on the specified server. This operation can be performed by users with AR System administrator privileges only.

Specified by:
create in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if container is not created

remove

public void remove()
            throws ARException
Deletes the container with the indicated name from the specified server and deletes any references to the container from other containers. Objects referenced by the container are not deleted. This method can only be performed by an administrator.

Specified by:
remove in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if container is not deleted

load

public void load()
          throws ARException
Populates this object with information from the AR System server.

Specified by:
load in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if container is not loaded

load

public void load(ContainerCriteria criteria)
          throws ARException
Returns the contents of the container with the indicated name with information specified by ContainerCriteria on the specified server. It can return references of a single, specified type, of all types, or of an exclude reference type. The system returns information for accessible references and does nothing for references for which the user does not have access. This operation can be performed by users with access permission for the container. Access to setAdminGroupList /getAdminGroupList information is limited to users with AR System administrator privileges only.

Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if container is not returned

store

public void store()
           throws ARException
Updates the definition for the container with the indicated name on the specified server. This operation can be performed by users with AR System administrator privileges only.

Specified by:
store in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if container is not stored

activate

public void activate()
AR System reserved method.

Specified by:
activate in interface IARPersistentObject

passivate

public void passivate()
AR System reserved method.

Specified by:
passivate in interface IARPersistentObject

equals

public boolean equals(java.lang.Object anObject)
Use this method for checking equality. The result is true only if the argument is not null, is of same type and represents the same content.

Overrides:
equals in class ObjectBase

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class ObjectBase

7.0 Action Request System Java API