Interface IScript
- All Superinterfaces:
IAdaptable
,IChangeListener
,IHasCustomValues
,IHasValues
,IPObject
,IUniqueObject
- Since:
- 3.24.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface com.polarion.alm.projects.model.IUniqueObject
KEY_ID
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addMaintainer
(IUser participant) Adds a user to the list of maintainers.void
delete()
Deletes this Script and removes all its files from the repository.getTitle()
getType()
boolean
boolean
boolean
removeMaintainer
(IUser participant) Removes a user from the list of maintainers.void
setContent
(InputStream content) Sets the script's content.void
setDescription
(Text description) Sets the script's Description text.void
setLogsStored
(boolean logsStored) Sets whether this Script should allow log collection while being executed.void
setMonitored
(boolean monitored) Sets whether this Script should be included in Script Monitoring.void
setReferenceName
(String referenceName) Sets the script's Reference Name, allowing you to reference it from other scripts.void
void
setType
(IScriptTypeOpt type) Sets the script's Type.Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adapt
Methods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChanged
Methods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomField
Methods inherited from interface com.polarion.platform.persistence.model.IPObject
can, copyTo, createStructureForKey, forget, getContextId, getDataRevision, getDataSvc, getEnumerationOptionForField, getEnumerationTypeForField, getFieldLabel, getFieldType, getIncompatibleCustomField, getIncompatibleCustomFieldPrototype, getIncompatibleCustomFieldsList, getLastRevision, getLocalId, getObjectId, getPrototype, getRevision, getUri, getValue, isModified, isPersisted, isReadOnly, isResolved, isUnresolvable, resolve, save, setEnumerationValue, setValue, update
Methods inherited from interface com.polarion.alm.projects.model.IUniqueObject
getId, getProject, getProjectId
-
Field Details
-
PROTO
- See Also:
-
KEY_AUTHOR
- See Also:
-
KEY_CREATED
- See Also:
-
KEY_TITLE
- See Also:
-
KEY_UPDATED
- See Also:
-
KEY_UPDATED_BY
- See Also:
-
KEY_PROJECT
- See Also:
-
KEY_CONTENT
- See Also:
-
KEY_TYPE
- See Also:
-
KEY_MAINTAINERS
- See Also:
-
KEY_REFERENCE_NAME
- See Also:
-
KEY_DESCRIPTION
- See Also:
-
KEY_MONITORED
- See Also:
-
KEY_LOGS_STORED
- See Also:
-
DIFF_IGNORED_FIELDS
-
-
Method Details
-
getAuthor
- Returns:
- the original author (creator) of the script.
-
getTitle
-
setTitle
-
getCreated
-
getUpdated
-
getUpdatedBy
-
delete
void delete()Deletes this Script and removes all its files from the repository. -
getContentStream
- Returns:
- the script's contents from the default script file (script.js). The content is not validated or interpreted in any way.
-
setContent
Sets the script's content. (The code to be executed.) The content is not validated or interpreted in any way. -
getType
-
setType
Sets the script's Type. Only the Save Hook, Condition, and Function types are allowed. -
getMaintainers
- Returns:
- the users
IUser
responsible for maintaining the script.
-
addMaintainer
Adds a user to the list of maintainers.- Parameters:
participant
- - theIUser
to add to the list of maintainers.- Returns:
true
, if the maintainer was added (false
if Script already has maintainer).
-
removeMaintainer
Removes a user from the list of maintainers.- Parameters:
participant
- - theIUser
to remove from the list of maintainers- Returns:
true
if maintainer was removed,false
if Work Item doesn't contain a participant.
-
getReferenceName
- Returns:
- the script's Reference Name, allowing you to reference it from other scripts.
-
setReferenceName
Sets the script's Reference Name, allowing you to reference it from other scripts.The Name can only contain alpha-numeric values, dashes, and underscores.
-
getReferencePath
- Returns:
- the reference path in the form of projectId/referenceName that you can use to reference (import) it into other scripts.
-
getDescription
- Returns:
- script's Description text.
-
setDescription
Sets the script's Description text. -
isMonitored
boolean isMonitored()- Returns:
- whether this Script should be included in Script Monitoring.
-
setMonitored
void setMonitored(boolean monitored) Sets whether this Script should be included in Script Monitoring. -
logsStored
boolean logsStored()- Returns:
- whether this Script allows log collection while being executed. This feature is used in Script Monitoring.
-
setLogsStored
void setLogsStored(boolean logsStored) Sets whether this Script should allow log collection while being executed. This feature is used in Script Monitoring.
-