public interface Procedure
| Modifier and Type | Method and Description |
|---|---|
Argument[] |
getArguments()
Gets the arguments info of the current procedure.
|
java.io.InputStream |
getIcon()
Gets the icon that is set for this procedure.
|
java.lang.String |
getName()
Gets the name of the procedure object.
|
java.lang.String |
getPath()
Gets the path of the procedure object.
|
java.lang.String |
getText()
Gets the specified text of the procedure.
|
boolean |
hasIcon()
Indicates whether the procedure has set icon or not.
|
boolean |
hasShortcut()
Indicates whether this procedure has a shortcut assigned to it.
|
void |
moveTo(java.lang.String targetFolderPath,
boolean replace)
Move this procedure to the specified folder.
|
void |
setArguments(Argument[] arguments)
Sets a list of arguments for this procedure.
|
void |
setIcon(java.io.InputStream icon)
Updates an existing icon of the procedure or sets such if it has not any.
|
void |
setName(java.lang.String name)
Sets a new name to the procedure.
|
void |
setShortcut(boolean hasShortcut)
Assigns a shortcut to the procedure.
|
void |
setText(java.lang.String text)
Changes current text of the procedure with the new one.
|
java.lang.String getName()
throws ManagementException
null.ManagementException - if system error occurs.java.lang.String getPath()
throws ManagementException
String this means that the procedure is
located in the root folder.ManagementException - if system error occurs.java.lang.String getText()
throws ManagementException
ManagementException - if system error occurs.void setName(java.lang.String name)
throws ManagementException
name can't be null.
The name must be unique in the scope of the procedure folder. An event with type ProcedureEvent.PROCEDURES_RENAME will be
generated if the procedure is successfully renamed.name - the new name of the procedureManagementException - if system error occurs, try to rename a procedure and to set already existing name in its folder or the logged user does
not imply the proper role.void setText(java.lang.String text)
throws ManagementException
text cannot be null or empty String. It will observe the rules of
the script for a procedure building. An event with type ProcedureEvent.PROCEDURE_MODIFIED will be
generated if the procedure text is successfully changed.text - the new text of the procedureManagementException - if system error occurs.void setIcon(java.io.InputStream icon)
throws ManagementException
icon parameter contains data of the desired picture to be set as icon image.
It there is already an icon; it can be removed when the method is called with null argument.
An event with type ProcedureEvent.PROCEDURE_MODIFIED will be
generated if the procedure icon is successfully changed.icon - the data of icon image for the procedureManagementException - if system error occurs or the logged user does not imply the proper role.java.io.InputStream getIcon()
throws ManagementException
Icon object and visualize it
in any GUI application. If the procedure has no icon null will be returned.InputStream containing the data of the imageManagementException - if system error occurs.boolean hasIcon()
throws ManagementException
true if there is a set icon to the procedure and false otherwiseManagementException - if system error occurs.Argument[] getArguments() throws ManagementException
ManagementException - if system error occurs.void setArguments(Argument[] arguments) throws ManagementException
ProcedureEvent.PROCEDURE_MODIFIED will be
generated if the procedure arguments are successfully changed. The method calls the method parseProcedureText() and
if the returned result is different from the arguments length or there is at least one argument with wrong type a ManagementException shall be thrown.
A wrong argument type is not empty String and it is not one from the defined type constants in Argument interface.arguments - the arguments infoManagementException - if system error occurs or the logged user does not imply the proper role.boolean hasShortcut()
throws ManagementException
true if there is an assigned shortcut, otherwise falseManagementException - if system error occurs.setShortcut(boolean hasShortcut)void setShortcut(boolean hasShortcut)
throws ManagementException
ProcedureEvent.PROCEDURE_MODIFIED will be
generated if the procedure shortcut is added or removed.hasShortcut - if true this method adds a shortcut to the procedure, otherwise it removes itManagementException - if system error occurs or the logged use does not imply the proper role.void moveTo(java.lang.String targetFolderPath,
boolean replace)
throws ManagementException
replace
argument has value false a ManagementExeption will be thrown. Otherwise the procedure will be replaced with the new one.
An event with type ProcedureEvent.PROCEDURE_MOVED will be
generated if the procedure is successfully moved to the new folder.targetFolderPath - the path of the folder where this one to be moved to.replace - specifies whether to replace a procedure with the same name in the destination folder, if such exists. If true, the existing procedure will be replaced. Otherwise - not.ManagementException - if
replace flag is falseCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.