Perforce

com.perforce.api
Class JobField

java.lang.Object
  |
  +--com.perforce.api.JobField

public final class JobField
extends Object

Data class for p4 jobspec field information. This class can be used to contain field information for a particular field within the jobspec.

TBD: This class is not really used anywhere else. It is intended to be used for more interaction with the jobs interface.

Version:
$Date: 2006/10/12 $ $Revision: #1 $
Author:
David Markley

Field Summary
static int ALWAYS
          Field type has always reset to the default upon saving
static int DATE
          Data type is a date/time field
static int DEFAULT
          Field type has default provided, still not required
static int LINE
          Data type is a one-liner
static int ONCE
          Field type has set once to the default and never changed
static int OPTIONAL
          Field type has no default, not required to be present
static int REQUIRED
          Field type has default provided, value must be present
static int SELECT
          Data type is one of a set of words
static int TEXT
          Data type is a block of text
static int WORD
          Data type is a single word (any value)
 
Constructor Summary
JobField()
           
JobField(int code, String name, int dtype, int len, int ftype)
           
JobField(int code, String name, String dtype, int len, String ftype)
           
 
Method Summary
 void addValue(String value)
           
 int getCode()
           
 int getDataType()
           
static JobField getField(String name)
           
 int getFieldType()
           
 int getLength()
           
 String getName()
           
 String getPreset()
           
 Enumeration getValues()
           
static void loadFields(Env env, boolean redo)
           
 void setCode(int code)
           
 void setDataType(int dtype)
           
 void setDataType(String dtype)
           
 void setFieldType(int ftype)
           
 void setFieldType(String ftype)
           
 void setLength(int len)
           
 void setName(String name)
           
 void setPreset(String value)
           
 String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALWAYS

public static final int ALWAYS
Field type has always reset to the default upon saving

DATE

public static final int DATE
Data type is a date/time field

DEFAULT

public static final int DEFAULT
Field type has default provided, still not required

LINE

public static final int LINE
Data type is a one-liner

ONCE

public static final int ONCE
Field type has set once to the default and never changed

OPTIONAL

public static final int OPTIONAL
Field type has no default, not required to be present

REQUIRED

public static final int REQUIRED
Field type has default provided, value must be present

SELECT

public static final int SELECT
Data type is one of a set of words

TEXT

public static final int TEXT
Data type is a block of text

WORD

public static final int WORD
Data type is a single word (any value)
Constructor Detail

JobField

public JobField()

JobField

public JobField(int code,
                String name,
                int dtype,
                int len,
                int ftype)

JobField

public JobField(int code,
                String name,
                String dtype,
                int len,
                String ftype)
Method Detail

addValue

public void addValue(String value)

getCode

public int getCode()

getDataType

public int getDataType()

getField

public static JobField getField(String name)

getFieldType

public int getFieldType()

getLength

public int getLength()

getName

public String getName()

getPreset

public String getPreset()

getValues

public Enumeration getValues()

loadFields

public static void loadFields(Env env,
                              boolean redo)

setCode

public void setCode(int code)

setDataType

public void setDataType(int dtype)

setDataType

public void setDataType(String dtype)

setFieldType

public void setFieldType(int ftype)

setFieldType

public void setFieldType(String ftype)

setLength

public void setLength(int len)

setName

public void setName(String name)

setPreset

public void setPreset(String value)

toXML

public String toXML()

Perforce

Copyright © 2001, Perforce Software, All rights reserved.