org.alfresco.repo.jscript
Class ClasspathScriptLocation

java.lang.Object
  extended by org.alfresco.repo.jscript.ClasspathScriptLocation
All Implemented Interfaces:
ScriptLocation

public class ClasspathScriptLocation
extends java.lang.Object
implements ScriptLocation

Classpath script location object.


Constructor Summary
ClasspathScriptLocation(java.lang.String location)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.io.InputStream getInputStream()
          Returns an input stream to the contents of the script
 java.lang.String getPath()
           
 java.io.Reader getReader()
          Returns a reader to the contents of the script
 int hashCode()
           
 boolean isCachable()
          Returns true if the script content is considered cachedable - i.e.
 boolean isSecure()
          Returns true if the script location is considered secure - i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClasspathScriptLocation

public ClasspathScriptLocation(java.lang.String location)
Constructor

Parameters:
location - the classpath location
Method Detail

getInputStream

public java.io.InputStream getInputStream()
Description copied from interface: ScriptLocation
Returns an input stream to the contents of the script

Specified by:
getInputStream in interface ScriptLocation
Returns:
the input stream
See Also:
ScriptLocation.getInputStream()

getReader

public java.io.Reader getReader()
Description copied from interface: ScriptLocation
Returns a reader to the contents of the script

Specified by:
getReader in interface ScriptLocation
Returns:
the reader
See Also:
ScriptLocation.getReader()

getPath

public java.lang.String getPath()
Specified by:
getPath in interface ScriptLocation
Returns:
unique path of this script location
See Also:
ScriptLocation.getPath()

isCachable

public boolean isCachable()
Description copied from interface: ScriptLocation
Returns 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:
isCachable in interface ScriptLocation
Returns:
true if the script content is considered cachedable, false otherwise

isSecure

public boolean isSecure()
Description copied from interface: ScriptLocation
Returns 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:
isSecure in interface ScriptLocation
Returns:
true if the script location is considered secure

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.