7.0 Action Request System Java API

com.remedy.arsys.api
Class Field

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

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

The Field class and methods are used to represent the properties of field objects.


Field Summary
 
Fields inherited from class com.remedy.arsys.api.ObjectBase
m_changeFlags, m_permissionList
 
Constructor Summary
protected Field(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 form field with the indicated name on the specified server.
 int getAuditOption()
          Returns audit option for the field.
 ARServerUser getContext()
           
 int getCreateMode()
          Returns the flag indicating the permission status for the field when users submit entries.
 DataType getDataType()
          Returns the data type of the field.
 Value getDefaultValue()
          Returns the default Value of a data field.
 DisplayInstanceList getDisplayInstance()
          Returns list of zero or more display properties to associate with the field.
 FieldID getFieldID()
          Returns the internal ID of the field.
 FieldLimitInfo getFieldLimit()
          Returns the value limits for the field and other properties specific to the field's type.
 FieldMappingInfo getFieldMap()
          Returns underlying form in which to create the field (applicable for join forms only).
 int getFieldOption()
          Returns the flag indicating whether users must enter a value in the field.
 int getFieldType()
          Returns a bitmask indicating field types.
 FieldKey getKey()
          Returns unique identifier for field.
 boolean getReservedIDOK()
          Returns the flag indicating whether you can create the field with a reserved ID.
 NameID getSchema()
          Returns the name of the schema the field is linked to.
 int getSetFieldOptions()
          Returns the flag indicating whether only display instances in the list will be replaced and rest left alone or if all of them will be replaced with new list.
 boolean isPresent()
          Denotes if the field is valid.
 void load()
          Populates this object with information from the AR System server.
 void load(FieldCriteria criteria)
          Populates this object with information specified by FieldCriteria from the AR System server.
 void passivate()
          AR System reserved method.
 void remove()
          Deletes the form field with the indicated ID from the specified server.
 void setAuditOption(int auditOption)
          Sets audit option 0 None 1 Audit 2 Copy 3 Audit and Copy
 void setContext(ARServerUser ctxt)
          Associates ARServerUser information with this AR System server object.
 void setCreateMode(int cm)
          Sets the flag indicating the permission status for the field when users submit entries.
 void setDataType(DataType type)
          Sets the data type of the field.
 void setDefaultValue(Value v)
          Sets the value to apply if a user submits an entry with no field value (applicable for data fields only).
 void setDeleteOption(int option)
          Sets the delete option when calling remove() on the field object to indicate the action to take if the specified field contains data (applicable for base schemas only) or is associated with a join schema.
 void setDisplayInstance(DisplayInstanceList displayInstance)
          Sets list of zero or more display properties to associate with the field.
 void setFieldID(FieldID fid)
          Sets the internal ID of the field to create.
 void setFieldLimit(FieldLimitInfo limit)
          Sets the value limits for the field and other properties specific to the field's type.
 void setFieldMap(FieldMappingInfo mapInfo)
          Sets underlying form in which to create the field (applicable for join forms only).
 void setFieldOption(int opt)
          Sets the flag indicating whether users must enter a value in the field.
 void setKey(FieldKey key)
          Sets unique identifier for field.
 void setPermissions(PermissionInfo[] permissions)
          Sets the permissions of the AR System object.
 void setReservedIDOK(boolean flag)
          Sets the flag indicating whether you can create the field with a reserved ID.
 void setSchema(NameID schema)
          Sets the name of the schema the field is linked to.
 void setSetFieldOptions(int opt)
          Sets the flag (following OR'd flags) into setFieldOptions to get the following behavior:
 void store()
          Saves the changes made to this object on the AR System server.
 void unsetContext()
          Removes the association to a specific user context.
 
Methods inherited from class com.remedy.arsys.api.ObjectBase
equals, getDiary, getHelpText, getLastChangedBy, getLastUpdateTime, getName, getNewName, getOwner, getPermissions, hashCode, resetChangeFlags, setDiary, setHelpText, setLastChangedBy, setName, setNewName, setOwner
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Field

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

setPermissions

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

Overrides:
setPermissions in class ObjectBase

isPresent

public boolean isPresent()
Denotes if the field is valid.


setDataType

public void setDataType(DataType type)
Sets the data type of the field. You can use any of the following DataType constants:


getDataType

public DataType getDataType()
Returns the data type of the field.


getFieldType

public int getFieldType()
Returns a bitmask indicating field types. You can use any of the following Constants:


setFieldID

public void setFieldID(FieldID fid)
Sets the internal ID of the field to create. The IDs of all fields and schema views(VUIs) associated with a given schema must be unique. Specify 0 for this parameter if you want the system to generate and return the ID. Otherwise, specify a value between 536870912 and 2147483647 (limited by AR_MAX_RESERVED_FIELD_ID). If you specify a reserved ID, the system generates an error unless the reservedIdOK parameter is set to 1 (TRUE) (see the Developing AR System Applications: Basic guide for restrictions on using reserved IDs).


getFieldID

public FieldID getFieldID()
Returns the internal ID of the field.


setSchema

public void setSchema(NameID schema)
Sets the name of the schema the field is linked to. This field must be associated with a single schema that currently exists on the server


getSchema

public NameID getSchema()
Returns the name of the schema the field is linked to.


setFieldOption

public void setFieldOption(int opt)
Sets the flag indicating whether users must enter a value in the field.


getFieldOption

public int getFieldOption()
Returns the flag indicating whether users must enter a value in the field.


setSetFieldOptions

public void setSetFieldOptions(int opt)
Sets the flag (following OR'd flags) into setFieldOptions to get the following behavior:


getSetFieldOptions

public int getSetFieldOptions()
Returns the flag indicating whether only display instances in the list will be replaced and rest left alone or if all of them will be replaced with new list.


setReservedIDOK

public void setReservedIDOK(boolean flag)
Sets the flag indicating whether you can create the field with a reserved ID.

TRUE: Allow reserved IDs.
FALSE: System will generate an error when you specify a reserved ID for the fieldId parameter.


getReservedIDOK

public boolean getReservedIDOK()
Returns the flag indicating whether you can create the field with a reserved ID.

TRUE: Allow reserved IDs.
FALSE: System will generate an error when you specify a reserved ID for the fieldId parameter.


setCreateMode

public void setCreateMode(int cm)
Sets the flag indicating the permission status for the field when users submit entries.

This parameter is ignored for display-only fields.


getCreateMode

public int getCreateMode()
Returns the flag indicating the permission status for the field when users submit entries.

This parameter is ignored for display-only fields.


setAuditOption

public void setAuditOption(int auditOption)
Sets audit option 0 None 1 Audit 2 Copy 3 Audit and Copy


getAuditOption

public int getAuditOption()
Returns audit option for the field.


setDefaultValue

public void setDefaultValue(Value v)
Sets the value to apply if a user submits an entry with no field value (applicable for data fields only). The default value can be as many as 255 bytes in length and must be of the same data type as the field. Do not call this function for trim, control, page, and page holder fields or if you do not want to define a default value.


getDefaultValue

public Value getDefaultValue()
Returns the default Value of a data field. The system returns 0 if the field has no default


setFieldLimit

public void setFieldLimit(FieldLimitInfo limit)
Sets the value limits for the field and other properties specific to the field's type. The type of the parameter to pass in is based on the field's type.


getFieldLimit

public FieldLimitInfo getFieldLimit()
Returns the value limits for the field and other properties specific to the field's type. Cast the return value to the appropriate type.


setDeleteOption

public void setDeleteOption(int option)
Sets the delete option when calling remove() on the field object to indicate the action to take if the specified field contains data (applicable for base schemas only) or is associated with a join schema.


getFieldMap

public FieldMappingInfo getFieldMap()
Returns underlying form in which to create the field (applicable for join forms only).


setFieldMap

public void setFieldMap(FieldMappingInfo mapInfo)
Sets underlying form in which to create the field (applicable for join forms only). If you are creating a field in a base form,specify a field type of 1 (AR_FIELD_REGULAR). Otherwise,specify a field type of 2 (AR_FIELD_JOIN), and identify the member form (primary or secondary) and field ID for the new field. If the member form is also a join form, create fields in all nested join forms until you can map the field to an underlying base form.


setDisplayInstance

public void setDisplayInstance(DisplayInstanceList displayInstance)
Sets list of zero or more display properties to associate with the field. You can define both display properties common to all form views (VUIs)and display properties specific to particular views. The system includes the field in each view you specify, regardless of whether you define any display properties for those views. If you do not specify a property for a particular view, the system uses the default value (if defined). Specify NULL for this parameter if you do not want to define any display properties.


getDisplayInstance

public DisplayInstanceList getDisplayInstance()
Returns list of zero or more display properties to associate with the field.


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

getKey

public FieldKey getKey()
Returns unique identifier for field.


setKey

public void setKey(FieldKey key)
Sets unique identifier for field.


create

public void create()
            throws ARException
Creates a new form field with the indicated name on the specified server. Forms can contain data and nondata fields. Nondata fields serve several purposes. Trim fields enhance the appearance and usability of the form (for example, lines, boxes, or static text). Control fields provide mechanisms for executing active links (for example, menus, buttons, or toolbar buttons). Other nondata fields organize data for viewing (for example, pages and page holders) or show data from another form (for example, tables and columns). An active link can be associated with only one control field (you can, however, choose any combination of screen appearances for that field). A particular control field, however, can be associated with multiple active links. While information about nondata fields is stored on the server, they do not require storage space in the underlying database.
Privileges: 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 object is not created

remove

public void remove()
            throws ARException
Deletes the form field with the indicated ID from the specified server. Depending on the value you specify for the deleteOption parameter, the field is deleted from the server immediately and is not returned to users who request information about fields. When a parent field is deleted, its child fields may also be deleted. For example, deleting a page holder field will delete all pages within it. All fields within those pages are removed from the current view but not deleted. Deleting a table field will delete all columns within it.
Privileges: This operation can be performed by users with AR System administrator privileges only.

Specified by:
remove in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object 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 object is not loaded

load

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

Throws:
ARException

store

public void store()
           throws ARException
Saves the changes made to this object on the AR System server.

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

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

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

7.0 Action Request System Java API