Class JobSpec
java.lang.Object
com.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.JobSpec
- All Implemented Interfaces:
IJobSpec,IServerResource
Simple generic default implementation class for the IJobSpec interface.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.perforce.p4java.core.IJobSpec
IJobSpec.IJobSpecField -
Field Summary
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource
refreshable, server, updateable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Completing a job spec callsrefresh()Get the comments associated with this jobspec.getFieldPreset(String fieldName) Get the preset for a given field.Return a list of all known Perforce job fields on this jobspec.getFieldValues(String fieldName) Get a list of field values for a given field.Return a map of the possible presets for each known jobspec field.Return a map of the values 'select' fields can have for each relevant jobspec field.voidrefresh()This method will refresh by getting the complete job spec model.voidsetComments(String comments) Set the comments associated with this jobspec.voidsetFields(List<IJobSpec.IJobSpecField> fields) Set the list of all known Perforce job fields on this jobspec.voidsetPresets(Map<String, String> presets) Set the map of the possible presets for each known jobspec field.voidSet the map of the values 'select' fields can have for each relevant jobspec field.Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource
canRefresh, canUpdate, clearRawFields, getRawField, getRawFields, hasRawField, parseDate, setRawField, setRawFields, setRefreshable, setServer, toDateString, update, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, getRawField, getRawFields, hasRawField, setRawField, setRawFields, setServer, update, update, update
-
Constructor Details
-
JobSpec
public JobSpec() -
JobSpec
-
-
Method Details
-
complete
Completing a job spec callsrefresh()- Specified by:
completein interfaceIServerResource- Overrides:
completein classServerResource- Throws:
ConnectionException- when there is an error talking to the Helix serverRequestException- when there is a problem with the data provided in the requestAccessException- when access to the branch command is not authorised- See Also:
-
refresh
This method will refresh by getting the complete job spec model. If this refresh is successful then this job spec will be marked as complete.- Specified by:
refreshin interfaceIServerResource- Overrides:
refreshin classServerResource- Throws:
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 caller- See Also:
-
getComments
Description copied from interface:IJobSpecGet the comments associated with this jobspec.- Specified by:
getCommentsin interfaceIJobSpec- Returns:
- possibly-null comments string. This may be rather large...
- See Also:
-
getFields
Description copied from interface:IJobSpecReturn a list of all known Perforce job fields on this jobspec. -
getPresets
Description copied from interface:IJobSpecReturn a map of the possible presets for each known jobspec field.- Specified by:
getPresetsin interfaceIJobSpec- Returns:
- non-null but possibly-empty map of presets
- See Also:
-
getValues
Description copied from interface:IJobSpecReturn a map of the values 'select' fields can have for each relevant jobspec field. -
getFieldValues
Description copied from interface:IJobSpecGet a list of field values for a given field.- Specified by:
getFieldValuesin interfaceIJobSpec- Parameters:
fieldName- non-null field name- Returns:
- possibly-null list of field values for the field.
- See Also:
-
getFieldPreset
Description copied from interface:IJobSpecGet the preset for a given field.- Specified by:
getFieldPresetin interfaceIJobSpec- Parameters:
fieldName- non-null field name- Returns:
- possibly-null preset for the named field.
- See Also:
-
setComments
Description copied from interface:IJobSpecSet the comments associated with this jobspec.- Specified by:
setCommentsin interfaceIJobSpec- Parameters:
comments- jobspec comment string- See Also:
-
setFields
Description copied from interface:IJobSpecSet the list of all known Perforce job fields on this jobspec. -
setPresets
Description copied from interface:IJobSpecSet the map of the possible presets for each known jobspec field.- Specified by:
setPresetsin interfaceIJobSpec- Parameters:
presets- map of presets- See Also:
-
setValues
Description copied from interface:IJobSpecSet the map of the values 'select' fields can have for each relevant jobspec field.
-