com.ibm.xsp.context
Class DojoLibrary

java.lang.Object
  extended by com.ibm.xsp.context.DojoLibrary
Direct Known Subclasses:
BundleDojoLibrary

public abstract class DojoLibrary
extends java.lang.Object

Dojo Library. Encapsulate the content of a Dojo library.


Constructor Summary
protected DojoLibrary()
           
 
Method Summary
abstract  boolean exists(java.lang.String path)
          Check if a resource exists in the library.
 java.util.Map getCSSResources()
          Get access to the Dojo CSS map.
 java.util.Map getDojoResources()
          Get access to the Dojo JS modules map.
abstract  java.io.InputStream getFileInputStream(java.lang.String path)
          Read a resource from the library.
abstract  java.lang.String getResourceUrl(java.lang.String url, boolean optimize)
          Encode the resource as a URL.
abstract  com.ibm.xsp.core.Version getVersion()
          Return the actual version of the library.
 int getVersionNumber()
          Shortcut: get the Version number from the version object.
abstract  java.lang.String getVersionTag()
          Return the version of this library.
abstract  boolean hasIbmModules()
          Check if the dojo library also contain the IBM modules.
abstract  boolean isDefaultIbmLibrary()
          Check if the library is the default one for IBM classes.
abstract  boolean isDefaultLibrary()
          Check if the library is the default one.
abstract  boolean useIbmLayers()
          Check if the layers can be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DojoLibrary

protected DojoLibrary()
Method Detail

isDefaultLibrary

public abstract boolean isDefaultLibrary()
Check if the library is the default one.


isDefaultIbmLibrary

public abstract boolean isDefaultIbmLibrary()
Check if the library is the default one for IBM classes.


getVersion

public abstract com.ibm.xsp.core.Version getVersion()
Return the actual version of the library.

Returns:

getVersionNumber

public final int getVersionNumber()
Shortcut: get the Version number from the version object.

Returns:

getVersionTag

public abstract java.lang.String getVersionTag()
Return the version of this library. The form of the version should be x.y.z, like 1.4.3 or 1.5.0

Returns:

getResourceUrl

public abstract java.lang.String getResourceUrl(java.lang.String url,
                                                boolean optimize)
Encode the resource as a URL. This method does all the necessary transformation for a URL. For example, it replaces an access to the servlet by a physical access to the Domino server. Or simply an access to a dojo resource that is not in the default library with a url that inludes the library version (e.g /dojoroot/ into /dojolib/x.y.z/)

Parameters:
url -
Returns:

exists

public abstract boolean exists(java.lang.String path)
Check if a resource exists in the library. The path should be a path to the file, like /dijit/TextBox.js


getFileInputStream

public abstract java.io.InputStream getFileInputStream(java.lang.String path)
                                                throws java.io.IOException
Read a resource from the library. The path should be a path to the file, like /dijit/TextBox.js

Throws:
java.io.IOException

hasIbmModules

public abstract boolean hasIbmModules()
Check if the dojo library also contain the IBM modules. The IbmModules (ibm.) are installed with the domino servers libraries but might not be installed by other contributed libraries. In that case, the runtime should read them from the default library.


useIbmLayers

public abstract boolean useIbmLayers()
Check if the layers can be used. The built layers can be used only if the IBM modules are contributed as part of the library. Practically, this means that the library is delivered as part of Notes/Domino, and not contributed apart from it.


getDojoResources

public java.util.Map getDojoResources()
Get access to the Dojo JS modules map.


getCSSResources

public java.util.Map getCSSResources()
Get access to the Dojo CSS map.