public class JobSpec extends ServerResource implements IJobSpec
Modifier and Type | Class and Description |
---|---|
protected class |
JobSpec.JobSpecField |
IJobSpec.IJobSpecField
refreshable, server, updateable
Constructor and Description |
---|
JobSpec() |
JobSpec(Map<String,Object> map,
IServer server) |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Completing a job spec calls
refresh() and updates the
#isComplete() flag. |
String |
getComments()
Get the comments associated with this jobspec.
|
String |
getFieldPreset(String fieldName)
Get the preset for a given field.
|
List<IJobSpec.IJobSpecField> |
getFields()
Return a list of all known Perforce job fields on this jobspec.
|
List<String> |
getFieldValues(String fieldName)
Get a list of field values for a given field.
|
Map<String,String> |
getPresets()
Return a map of the possible presets for each known jobspec field.
|
Map<String,List<String>> |
getValues()
Return a map of the values 'select' fields can have for each relevant jobspec
field.
|
void |
refresh()
This method will refresh by getting the complete job spec model.
|
void |
setComments(String comments)
Set the comments associated with this jobspec.
|
void |
setFields(List<IJobSpec.IJobSpecField> fields)
Set the list of all known Perforce job fields on this jobspec.
|
void |
setPresets(Map<String,String> presets)
Set the map of the possible presets for each known jobspec field.
|
void |
setValues(Map<String,List<String>> values)
Set the map of the values 'select' fields can have for each relevant jobspec
field.
|
canRefresh, canUpdate, setRefreshable, setServer, update, update, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRefresh, canUpdate, setServer, update, update, update
public void complete() throws ConnectionException, RequestException, AccessException
refresh()
and updates the
#isComplete()
flag.complete
in class ServerResource
ConnectionException
RequestException
AccessException
refresh()
,
ServerResource.complete()
public void refresh() throws ConnectionException, RequestException, AccessException
refresh
in interface IServerResource
refresh
in class ServerResource
ConnectionException
- if the Perforce server is unreachable or is not
connected.RequestException
- if the Perforce server encounters an error during
its processing of the requestAccessException
- if the Perforce server denies access to the callerServerResource.refresh()
public String getComments()
IJobSpec
getComments
in interface IJobSpec
IJobSpec.getComments()
public List<IJobSpec.IJobSpecField> getFields()
IJobSpec
getFields
in interface IJobSpec
IJobSpec.getFields()
public Map<String,String> getPresets()
IJobSpec
getPresets
in interface IJobSpec
IJobSpec.getPresets()
public Map<String,List<String>> getValues()
IJobSpec
getValues
in interface IJobSpec
IJobSpec.getValues()
public List<String> getFieldValues(String fieldName)
IJobSpec
getFieldValues
in interface IJobSpec
fieldName
- non-null field nameIJobSpec.getFieldValues(java.lang.String)
public String getFieldPreset(String fieldName)
IJobSpec
getFieldPreset
in interface IJobSpec
fieldName
- non-null field nameIJobSpec.getFieldPreset(java.lang.String)
public void setComments(String comments)
IJobSpec
setComments
in interface IJobSpec
comments
- jobspec comment stringIJobSpec.setComments(java.lang.String)
public void setFields(List<IJobSpec.IJobSpecField> fields)
IJobSpec
setFields
in interface IJobSpec
fields
- list of job fieldsIJobSpec.setFields(java.util.List)
public void setPresets(Map<String,String> presets)
IJobSpec
setPresets
in interface IJobSpec
presets
- map of presetsIJobSpec.setPresets(java.util.Map)
public void setValues(Map<String,List<String>> values)
IJobSpec
setValues
in interface IJobSpec
values
- value mapIJobSpec.setValues(java.util.Map)
Copyright © 2017 Perforce Software. All Rights Reserved.