Perforce

com.perforce.api
Class JobField

java.lang.Object
  extended by 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: 2008/01/28 $ $Revision: #8 $
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

See Also:
Constant Field Values

DATE

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

See Also:
Constant Field Values

DEFAULT

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

See Also:
Constant Field Values

LINE

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

See Also:
Constant Field Values

ONCE

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

See Also:
Constant Field Values

OPTIONAL

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

See Also:
Constant Field Values

REQUIRED

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

See Also:
Constant Field Values

SELECT

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

See Also:
Constant Field Values

TEXT

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

See Also:
Constant Field Values

WORD

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

See Also:
Constant Field Values
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 © 2008, Perforce Software, All rights reserved.