Interface IScript
- All Superinterfaces:
IAdaptable,IChangeListener,IHasCustomValues,IHasValues,IPObject,IUniqueObject
- Since:
- 3.24.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface com.polarion.alm.projects.model.IUniqueObject
KEY_ID -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMaintainer(IUser participant) Adds a user to the list of maintainers.voiddelete()Deletes this Script and removes all its files from the repository.getTitle()getType()booleanbooleanbooleanremoveMaintainer(IUser participant) Removes a user from the list of maintainers.voidsetContent(InputStream content) Sets the script's content.voidsetDescription(Text description) Sets the script's Description text.voidsetLogsStored(boolean logsStored) Sets whether this Script should allow log collection while being executed.voidsetMonitored(boolean monitored) Sets whether this Script should be included in Script Monitoring.voidsetReferenceName(String referenceName) Sets the script's Reference Name, allowing you to reference it from other scripts.voidvoidsetType(IScriptTypeOpt type) Sets the script's Type.Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adaptMethods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChangedMethods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomFieldMethods 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, updateMethods 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
IUserresponsible for maintaining the script.
-
addMaintainer
Adds a user to the list of maintainers.- Parameters:
participant- - theIUserto add to the list of maintainers.- Returns:
true, if the maintainer was added (falseif Script already has maintainer).
-
removeMaintainer
Removes a user from the list of maintainers.- Parameters:
participant- - theIUserto remove from the list of maintainers- Returns:
trueif maintainer was removed,falseif 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.
-