Package org.alfresco.repo.jscript
Class ClasspathScriptLocation
- java.lang.Object
-
- org.alfresco.repo.jscript.ClasspathScriptLocation
-
- All Implemented Interfaces:
ScriptLocation
public class ClasspathScriptLocation extends java.lang.Object implements ScriptLocation
Classpath script location object.- Author:
- Roy Wetherall
-
-
Constructor Summary
Constructors Constructor Description ClasspathScriptLocation(java.lang.String location)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.io.InputStreamgetInputStream()Returns an input stream to the contents of the scriptjava.lang.StringgetPath()java.io.ReadergetReader()Returns a reader to the contents of the scriptinthashCode()booleanisCachable()Returns true if the script content is considered cachedable - i.e.booleanisSecure()Returns true if the script location is considered secure - i.e.java.lang.StringtoString()
-
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream()
Description copied from interface:ScriptLocationReturns an input stream to the contents of the script- Specified by:
getInputStreamin interfaceScriptLocation- Returns:
- the input stream
- See Also:
ScriptLocation.getInputStream()
-
getReader
public java.io.Reader getReader()
Description copied from interface:ScriptLocationReturns a reader to the contents of the script- Specified by:
getReaderin interfaceScriptLocation- Returns:
- the reader
- See Also:
ScriptLocation.getReader()
-
getPath
public java.lang.String getPath()
- Specified by:
getPathin interfaceScriptLocation- Returns:
- unique path of this script location
- See Also:
ScriptLocation.getPath()
-
isCachable
public boolean isCachable()
Description copied from interface:ScriptLocationReturns true if the script content is considered cachedable - i.e. classpath located or similar. Else the content will be compiled/interpreted on every execution i.e. repo content.- Specified by:
isCachablein interfaceScriptLocation- Returns:
- true if the script content is considered cachedable, false otherwise
-
isSecure
public boolean isSecure()
Description copied from interface:ScriptLocationReturns true if the script location is considered secure - i.e. on the repository classpath. Secure scripts may access java.* libraries and instantiate pure Java objects directly. Unsecure scripts only have access to pre-configure host objects and cannot access java.* libs.- Specified by:
isSecurein interfaceScriptLocation- Returns:
- true if the script location is considered secure
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-