7.0 Action Request System Java API

com.remedy.arsys.api
Class Schema

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

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

The Schema class and methods are used to represent the properties of schema objects.

"Schemas" in AR System are also known as "forms."

Note: All the constants used in the Schema class are found in the Constants class.


Field Summary
 
Fields inherited from class com.remedy.arsys.api.ObjectBase
m_changeFlags, m_permissionList
 
Constructor Summary
protected Schema(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 this schema on the server specified in the ARServerUser.
 void deleteFields(FieldID[] fieldIds, int option)
          Deletes the schema fields with the specified IDs from this Schema object
 boolean equals(java.lang.Object anObject)
          Use this method for checking equality.
 InternalID[] getAdminGrpList()
          Retrives the list of groups who can administer this schema (and the associated filters, escalations, and active links).
 ArchiveInfo getArchiveInfo()
          Returns the archive info for the schema.
 AuditInfo getAuditInfo()
          Returns the audit info for the schema.
 CompoundSchemaInfo getCompoundSchema()
          Returns the Compound Schema Object.
 ARServerUser getContext()
           
 NameID getDefaultVUI()
          Returns the label for the default view.
 EntryListFieldInfo[] getEntryListFieldInfo()
          Returns the list of fields that identifies the default query list data for retrieving schema entries.
 IndexInfo[] getIndexInfo()
          Returns the list of indexes for the schema.
 SchemaKey getKey()
          Returns unique identifier for schema.
 PropInfo[] getProperties()
          Returns the object properties associated with a SCC integration.
 int getSchemaType()
          Returns the schema type.
 SortInfo[] getSortInfo()
          Returns the list of fields that identifies the default sort order for retrieving schema entries.
 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(SchemaCriteria criteria)
          Populates this object with information specified by SchemaCriteria from the AR System server.
 void passivate()
          AR System reserved method.
 void remove()
          Deletes this schema from the server specified in the ARServerUser and deletes any container references to this schema.
 void setAdminGrpList(InternalID[] adminList)
          Sets the list of groups who can administer this schema (and the associated filters, escalations, and active links).
 void setArchiveInfo(ArchiveInfo archiveInfo)
          Sets the archive info for the schema.
 void setAuditInfo(AuditInfo auditInfo)
          Sets the audit info for the schema.
 void setContext(ARServerUser ctxt)
          Associates ARServerUser information with this AR System server object.
 void setDefaultVUI(NameID defaultVUI)
          Sets the label for the default view.
 void setDeleteOption(int option)
          Sets the delete option indicating the action to take if the specified schema contains entries (applicable for base schemas only) or is a member of a join schema.
 void setEntryListFieldInfo(EntryListFieldInfo[] getListFields)
          Sets the list of fields that identifies the default query list data for retrieving schema entries.
 void setIndexInfo(IndexInfo[] indexList)
          Sets the list of indexes to create for the schema.
 void setKey(SchemaKey key)
          Sets unique identifier for schema.
 void setPermissions(PermissionInfo[] permissions)
          Sets the permissions of the AR System object.
 void setProperties(PropInfo[] props)
          Sets the object properties associated with a Source Code Control (SCC) integration.
 void setSchemaType(int type, CompoundSchemaInfo compoundSchema)
          Sets the schema type.
 void setSortInfo(SortInfo[] sortList)
          Sets the list of fields that identifies the default sort order for retrieving schema entries.
 void store()
          Updates this schema on the database
 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

Schema

protected Schema(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

setAdminGrpList

public void setAdminGrpList(InternalID[] adminList)
Sets the list of groups who can administer this schema (and the associated filters, escalations, and active links). Users must belong to both a specified group and the Subadministrator group to obtain these privileges. Specifying an empty administrator group list defines a form 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

getAdminGrpList

public InternalID[] getAdminGrpList()
Retrives the list of groups who can administer this schema (and the associated filters, escalations, and active links). Users must belong to both a specified group and the Subadministrator group to obtain these privileges.


getSortInfo

public SortInfo[] getSortInfo()
Returns the list of fields that identifies the default sort order for retrieving schema entries.


setSortInfo

public void setSortInfo(SortInfo[] sortList)
Sets the list of fields that identifies the default sort order for retrieving schema entries. Specifying SortInfo in an EntryCriteria object when calling find or findObjects on EntryFactory overrides the default sort order.

Parameters:
sortList - An array of SortInfo objects

setIndexInfo

public void setIndexInfo(IndexInfo[] indexList)
Sets the list of indexes to create for the schema. You can specify from 1 to 16 fields for each index (limited by AR_MAX_INDEX_FIELDS). Diary fields and character fields larger than 255 bytes cannot be indexed.

Parameters:
indexList - An array of IndexInfo objects

getIndexInfo

public IndexInfo[] getIndexInfo()
Returns the list of indexes for the schema.


setArchiveInfo

public void setArchiveInfo(ArchiveInfo archiveInfo)
Sets the archive info for the schema.


getArchiveInfo

public ArchiveInfo getArchiveInfo()
Returns the archive info for the schema.


setAuditInfo

public void setAuditInfo(AuditInfo auditInfo)
Sets the audit info for the schema.


getAuditInfo

public AuditInfo getAuditInfo()
Returns the audit info for the schema.


setEntryListFieldInfo

public void setEntryListFieldInfo(EntryListFieldInfo[] getListFields)
Sets the list of fields that identifies the default query list data for retrieving schema entries. The list can include any data fields except diary fields and long character fields. The combined length of all specified fields, including separator characters, can be as many as 128 bytes (limited by AR_MAX_SDESC_SIZE). The query list displays the Short-Description core field by default(or zero fields). Specifying EntryListFieldInfo in an EntryCriteria object when calling find or findObjects on EntryFactory overrides the default query list data.

Parameters:
getListFields - An array of EntryListFieldInfo objects

getEntryListFieldInfo

public EntryListFieldInfo[] getEntryListFieldInfo()
Returns the list of fields that identifies the default query list data for retrieving schema entries.


setDeleteOption

public void setDeleteOption(int option)
Sets the delete option indicating the action to take if the specified schema contains entries (applicable for base schemas only) or is a member of a join schema.

Parameters:
option - Possible values are:

  • 0: Do not delete the schema
  • 1: Delete if schema contains entries but not if it is a member of a join schema
  • 2: Delete the schema and all join schemas dependent on it

setSchemaType

public void setSchemaType(int type,
                          CompoundSchemaInfo compoundSchema)
Sets the schema type. If you do not call this function, the schema is set to Base schema by default.

Parameters:
type - The type of the schema. Possible values are:

  • 1: Base schema.
  • 2: Join schema (has two base schemas).
  • 3: View schema.
  • 4: Display-only schema (contains only display-only fields)

      compoundSchema - The compound schema.

getSchemaType

public int getSchemaType()
Returns the schema type. The schema type values are as follows:


getCompoundSchema

public CompoundSchemaInfo getCompoundSchema()
Returns the Compound Schema Object.


setProperties

public void setProperties(PropInfo[] props)
Sets the object properties associated with a Source Code Control (SCC) integration.

In the AR System, server objects have a list of properties, represented as tag-value pairs. Each PropInfo object contains a tag and a Value that is used to store the value for a given tag. If you do not specify the object properties, an object properties list with zero properties will be associated with the field.

Parameters:
props - An array of PropInfo objects

getProperties

public PropInfo[] getProperties()
Returns the object properties associated with a SCC integration.


getKey

public SchemaKey getKey()
Returns unique identifier for schema.


setKey

public void setKey(SchemaKey key)
Sets unique identifier for schema.


setDefaultVUI

public void setDefaultVUI(NameID defaultVUI)
Sets the label for the default view.


getDefaultVUI

public NameID getDefaultVUI()
Returns the label for the default view.


deleteFields

public void deleteFields(FieldID[] fieldIds,
                         int option)
                  throws ARException
Deletes the schema fields with the specified IDs from this Schema object

Parameters:
option - Delete option
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if fields are not deleted

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 this schema on the server specified in the ARServerUser. The nine required core fields are automatically associated with this new schema.

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

remove

public void remove()
            throws ARException
Deletes this schema from the server specified in the ARServerUser and deletes any container references to this schema. Depending on the delete option you specify, the schema is deleted from the server immediately and is not returned to users who request information about schemas. In addition, the system deletes all entries, fields, views (VUIs), active links, escalations, and filters associated with the schema and all containers owned by the schema.

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

load

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

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

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 object is not saved

store

public void store()
           throws ARException
Updates this schema on the database

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

activate

public void activate()
Description copied from interface: IARPersistentObject
AR System reserved method.

Specified by:
activate in interface IARPersistentObject

passivate

public void passivate()
Description copied from interface: IARPersistentObject
AR System reserved method.

Specified by:
passivate in interface IARPersistentObject

getContext

public ARServerUser getContext()

setContext

public void setContext(ARServerUser ctxt)
Description copied from interface: IARPersistentObject
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()
Description copied from interface: IARPersistentObject
Clears all of the references to member objects.

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

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