com.flexive.shared.scripting
Class FxScriptInfoEdit

java.lang.Object
  extended by com.flexive.shared.AbstractSelectableObjectWithName
      extended by com.flexive.shared.scripting.FxScriptInfo
          extended by com.flexive.shared.scripting.FxScriptInfoEdit
All Implemented Interfaces:
SelectableObject, SelectableObjectWithName, java.io.Serializable

public class FxScriptInfoEdit
extends FxScriptInfo

Editable FxScriptInfo

Author:
Gerhard Glos (gerhard.glos@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Field Summary
protected  java.lang.String code
           
 
Fields inherited from class com.flexive.shared.scripting.FxScriptInfo
active, cached, description, event, id, name
 
Constructor Summary
FxScriptInfoEdit(FxScriptInfo si)
          Constructs a editable script info object from FxScriptInfo.
FxScriptInfoEdit(long id, FxScriptEvent event, java.lang.String name, java.lang.String description, java.lang.String code, boolean active, boolean cached)
          Constructor
 
Method Summary
 java.lang.String getCode()
           
 void setActive(boolean active)
           
 void setCached(boolean cached)
          Implementation detail: cached groovy scripts cannot be run concurrently, but are only compiled once.
 void setCode(java.lang.String code)
           
 void setDescription(java.lang.String description)
           
 void setEvent(FxScriptEvent event)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class com.flexive.shared.scripting.FxScriptInfo
asEditable, getDescription, getEvent, getId, getName, isActive, isCached
 
Methods inherited from class com.flexive.shared.AbstractSelectableObjectWithName
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code

protected java.lang.String code
Constructor Detail

FxScriptInfoEdit

public FxScriptInfoEdit(long id,
                        FxScriptEvent event,
                        java.lang.String name,
                        java.lang.String description,
                        java.lang.String code,
                        boolean active,
                        boolean cached)
                 throws FxInvalidParameterException
Constructor

Parameters:
id - script id
event - script type
name - (unique) name of the script
description - description
code - the script code
active - if the script is active
cached - if the script is cached
Throws:
FxInvalidParameterException - on errors
Since:
3.1.1
See Also:
FxScriptEvent

FxScriptInfoEdit

public FxScriptInfoEdit(FxScriptInfo si)
                 throws FxApplicationException
Constructs a editable script info object from FxScriptInfo.

Parameters:
si - the script info object
Throws:
FxApplicationException - if the code could not be loaded
Method Detail

setEvent

public void setEvent(FxScriptEvent event)

setName

public void setName(java.lang.String name)

setDescription

public void setDescription(java.lang.String description)

getCode

public java.lang.String getCode()

setCode

public void setCode(java.lang.String code)

setActive

public void setActive(boolean active)

setCached

public void setCached(boolean cached)
Implementation detail: cached groovy scripts cannot be run concurrently, but are only compiled once. Groovy scripts that are not cached are compiled every time before execution (cached = false is suitable for long running groovy scripts that are likely to be executed concurrently).

Parameters:
cached - if a script should be cached
Since:
3.1.1