com.ibm.xsp.context
Class BundleDojoLibrary

java.lang.Object
  extended by com.ibm.xsp.context.DojoLibrary
      extended by com.ibm.xsp.context.BundleDojoLibrary

public class BundleDojoLibrary
extends DojoLibrary

Basic class for a Dojo Library contributed as a bundle.


Constructor Summary
BundleDojoLibrary(org.osgi.framework.Bundle bundle, java.lang.String versionTag, java.lang.String prefix)
           
 
Method Summary
 boolean exists(java.lang.String path)
          Check if a resource exists in the library.
 org.osgi.framework.Bundle getBundle()
           
protected  DojoLibrary getDelegate(java.lang.String path)
           
protected  DojoLibrary getDelegateUrl(java.lang.String url)
           
 java.io.InputStream getFileInputStream(java.lang.String path)
          Read a resource from the library.
 java.lang.String getPrefix()
           
 java.lang.String getResourceUrl(java.lang.String path, boolean optimize)
          Encode the resource as a URL.
 com.ibm.xsp.core.Version getVersion()
          Return the actual version of the library.
 java.lang.String getVersionTag()
          Return the version of this library.
 boolean hasIbmModules()
          Check if the dojo library also contain the IBM modules.
 boolean isDefaultIbmLibrary()
          Check if the library is the default one for IBM classes.
 boolean isDefaultLibrary()
          Check if the library is the default one.
 boolean useIbmLayers()
          Check if the layers can be used.
 
Methods inherited from class com.ibm.xsp.context.DojoLibrary
getCSSResources, getDojoResources, getVersionNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleDojoLibrary

public BundleDojoLibrary(org.osgi.framework.Bundle bundle,
                         java.lang.String versionTag,
                         java.lang.String prefix)
Method Detail

getBundle

public org.osgi.framework.Bundle getBundle()

getPrefix

public java.lang.String getPrefix()

isDefaultLibrary

public boolean isDefaultLibrary()
Description copied from class: DojoLibrary
Check if the library is the default one.

Specified by:
isDefaultLibrary in class DojoLibrary

isDefaultIbmLibrary

public boolean isDefaultIbmLibrary()
Description copied from class: DojoLibrary
Check if the library is the default one for IBM classes.

Specified by:
isDefaultIbmLibrary in class DojoLibrary

getVersion

public com.ibm.xsp.core.Version getVersion()
Description copied from class: DojoLibrary
Return the actual version of the library.

Specified by:
getVersion in class DojoLibrary
Returns:

getVersionTag

public java.lang.String getVersionTag()
Description copied from class: DojoLibrary
Return the version of this library. The form of the version should be x.y.z, like 1.4.3 or 1.5.0

Specified by:
getVersionTag in class DojoLibrary
Returns:

getResourceUrl

public java.lang.String getResourceUrl(java.lang.String path,
                                       boolean optimize)
Description copied from class: DojoLibrary
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/)

Specified by:
getResourceUrl in class DojoLibrary
Returns:

getDelegateUrl

protected DojoLibrary getDelegateUrl(java.lang.String url)

exists

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

Specified by:
exists in class DojoLibrary

getFileInputStream

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

Specified by:
getFileInputStream in class DojoLibrary
Throws:
java.io.IOException

getDelegate

protected DojoLibrary getDelegate(java.lang.String path)

hasIbmModules

public boolean hasIbmModules()
Description copied from class: DojoLibrary
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.

Specified by:
hasIbmModules in class DojoLibrary

useIbmLayers

public boolean useIbmLayers()
Description copied from class: DojoLibrary
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.

Specified by:
useIbmLayers in class DojoLibrary