Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.jdeveloper.jsp.libraries
Class JspLibraryManager

java.lang.Object
  extended by oracle.jdeveloper.jsp.libraries.JspLibraryManager

public final class JspLibraryManager
extends java.lang.Object

Restrictions imposed by the library manager:

  1. JspLibrary can not be added to the manager if there is a library with the same name and same version.
  2. JspLibrary can not be added to the manager if there is already a library with the same URI but different name. All libraries with the same URI must have same name.
  3. JspLibrary URI has to be the same as the one specified in the TLD file, if it exists. This rule is not inforced at the library registration time but all clients of this class has to obey it.
  4. If TLD file does not contain URI, tag library URI has to be the same as the one TLD's resource path when it is deployed, i.e. of the form /WEB-INF/lib/.jar or /WEB-INF/lib/.tld.
  5. TLD file has to be located in one of the following places:


Method Summary
 void addJspLibraryEventListener(JspLibraryEventListener listener)
          Add a JspLibraryEventListener to the JspLibraryManager.
 void addJspLibraryListener(JspLibraryListener listener)
          Add a JspLibraryListener to the JspLibraryManager.
 void addJspLibraryURLClassesProvider(JspLibraryURLClassesProvider urlProvider)
           
 JspLibrary addLibrary(JspLibrary library)
          Add a JspLibrary to the current model.
 JspLibrary addLibrary(JspLibrary library, boolean isUserLibrary)
          Adds library and marks it (non)editable for user via GUI.
 boolean containsLibrary(JspLibrary library)
          Checks if library instance is already added to the manager.
 void copyTo(JspLibraryManager target)
           
 java.util.Collection<JspLibrary> getAllLibraries()
          Return all installed Tag Libraries.
 JspLibraryManager getCopy()
           
 JspLibrary getFirstLibraryFromPrefix(java.lang.String prefix)
          Finds a JspLibrary that has preffered prefix equal to the given prefix.
static java.util.Collection<java.net.URL> getIndexingMetadata()
           
static JspLibraryManager getInstance()
          Retrieve the current instance of the JspLibraryManager
 java.util.Collection<JspLibraryURLClassesProvider> getJspLibraryURLClassesProviders()
           
static java.net.URL getKnownLibraryAnnotations(JspLibrary library)
           
static java.net.URL getKnownLibrarySchema(JspLibrary library)
           
 java.util.Collection<JspLibrary> getLatestLibraryVersions()
          Return latest versions of all installed Tag Libraries.
 java.util.Collection<JspLibrary> getLibraries(java.lang.String libraryName)
          Return all versions of the installed Tag Libraries with a given name.
 java.util.Collection<JspLibrary> getLibrariesFromPrefix(java.lang.String prefix)
          Returns all libraries that have given preffered prefix.
 java.util.Collection<JspLibrary> getLibrariesFromURI(java.lang.String uri)
          Finds all versions of the library with the given URI.
 JspLibrary getLibrary(java.lang.String libraryName)
          Return latest versions of the installed Tag Libraries with a given name.
 JspLibrary getLibrary(java.lang.String libraryName, java.lang.String version)
          Finds specified version of the installed Tag Library with a given name.
 JspLibrary getLibraryFromURI(java.lang.String uri)
          Finds a latest version of the library with the given URI.
 JspLibrary getLibraryFromURI(java.lang.String uri, java.lang.String version)
          Finds a given version of the library with the given URI.
static java.net.URL getLibraryIndexingMetadata(java.lang.String tagLibUri)
           
 java.util.Collection<JspLibrary> getPackagedLibraries(java.net.URL archiveURL)
          Returns all tag libraries registered with the manager that are packaged in the given archive.
 java.lang.String getPrefixFromURI(java.lang.String uri)
          Given a JSP tag library URI returns preffered prefix for its latest version.
 JspLibrary getUnpackagedLibrary(java.net.URL tldURL)
           
 MutableLibraryList getUserLibraries()
           
 boolean isEditable(JspLibrary library)
           
 void notifyObservers(JspLibrary library, java.util.List changes)
          If library is changed in a way that it colides with others it will be removed.
 void notifyObservers(JspLibrary library, oracle.bali.xml.share.PropertyChange change)
          If library is changed in a way that it colides with others it will be removed.
 void notifyObserversJspLibraryCreateEvents(oracle.jdevimpl.webapp.jsp.libraries.model.JspLibraryListWrapper jspLibraryListWrapper, JspLibrary library)
          If library is created, notification is sent to Observers before its added
static void registerKnownLibraryAnnotations(java.lang.String tagLibUri, java.lang.String libVersion, java.net.URL url)
           
static void registerKnownLibraryAnnotations(java.lang.String tagLibUri, java.net.URL url)
          Registers location of the standalone metadata annotation file that contains metadata for tag library identified by the URI.
static void registerKnownLibrarySchema(java.lang.String tagLibUri, java.lang.String libVersion, java.net.URL url)
           
static void registerKnownLibrarySchema(java.lang.String tagLibUri, java.net.URL url)
          Registers location of the schema file that contains grammar definition for tag library identified by the URI.
static void registerLibraryIndexingMetadata(java.lang.String tagLibUri, java.net.URL url)
           
 void removedJspLibraryURLClassesProvider(JspLibraryURLClassesProvider urlProvider)
           
 void removeJspLibraryEventListener(JspLibraryEventListener listener)
          Remove a JspLibraryEventListener from the JspLibraryManager.
 void removeJspLibraryListener(JspLibraryListener listener)
          Remove a JspLibraryListener from the JspLibraryManager.
 boolean removeLibrary(JspLibrary library)
          Remove a JspLibrary from the current model.
 void removeLibrary(java.lang.String uri)
          Remove a latest version of the tag library with giver URI.
 void setUserLibraries(MutableLibraryList userLibs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCopy

public JspLibraryManager getCopy()

copyTo

public void copyTo(JspLibraryManager target)

getInstance

public static JspLibraryManager getInstance()
Retrieve the current instance of the JspLibraryManager

Returns:
the current JspLibraryManager

getUserLibraries

public MutableLibraryList getUserLibraries()

setUserLibraries

public void setUserLibraries(MutableLibraryList userLibs)

addJspLibraryURLClassesProvider

public void addJspLibraryURLClassesProvider(JspLibraryURLClassesProvider urlProvider)

removedJspLibraryURLClassesProvider

public void removedJspLibraryURLClassesProvider(JspLibraryURLClassesProvider urlProvider)

getJspLibraryURLClassesProviders

public java.util.Collection<JspLibraryURLClassesProvider> getJspLibraryURLClassesProviders()

addJspLibraryListener

public void addJspLibraryListener(JspLibraryListener listener)
Add a JspLibraryListener to the JspLibraryManager.

Parameters:
listener - the listener to add.

removeJspLibraryListener

public void removeJspLibraryListener(JspLibraryListener listener)
Remove a JspLibraryListener from the JspLibraryManager.

Parameters:
listener - the listener to remove.

notifyObservers

public void notifyObservers(JspLibrary library,
                            oracle.bali.xml.share.PropertyChange change)
If library is changed in a way that it colides with others it will be removed.


notifyObservers

public void notifyObservers(JspLibrary library,
                            java.util.List changes)
If library is changed in a way that it colides with others it will be removed.


addLibrary

public JspLibrary addLibrary(JspLibrary library)
Add a JspLibrary to the current model.

Parameters:
library - JspLibrary to add.
Returns:
library being added. Returns null if adding fails.

addLibrary

public JspLibrary addLibrary(JspLibrary library,
                             boolean isUserLibrary)
Adds library and marks it (non)editable for user via GUI.

Parameters:
isUserLibrary - false is library is added by an extension
See Also:
addLibrary( JspLibrary )

containsLibrary

public boolean containsLibrary(JspLibrary library)
Checks if library instance is already added to the manager.


removeLibrary

public boolean removeLibrary(JspLibrary library)
Remove a JspLibrary from the current model.

Parameters:
library - JspLibrary to remove.
Returns:
true if library successfully removed

removeLibrary

public void removeLibrary(java.lang.String uri)
Remove a latest version of the tag library with giver URI.

Parameters:
uri - URI of the tag library.

getFirstLibraryFromPrefix

public JspLibrary getFirstLibraryFromPrefix(java.lang.String prefix)
Finds a JspLibrary that has preffered prefix equal to the given prefix. Returns that latest version of the library.

Parameters:
prefix - Prefix of tag library.

getLibrariesFromPrefix

public java.util.Collection<JspLibrary> getLibrariesFromPrefix(java.lang.String prefix)
Returns all libraries that have given preffered prefix.

Parameters:
prefix - Prefix of tag library.

getLibrary

public JspLibrary getLibrary(java.lang.String libraryName)
Return latest versions of the installed Tag Libraries with a given name.

Parameters:
libraryName -

getLibraries

public java.util.Collection<JspLibrary> getLibraries(java.lang.String libraryName)
Return all versions of the installed Tag Libraries with a given name.

Returns:
collection containing JspLibrary objects

getLibrary

public JspLibrary getLibrary(java.lang.String libraryName,
                             java.lang.String version)
Finds specified version of the installed Tag Library with a given name.


getLibraryFromURI

public JspLibrary getLibraryFromURI(java.lang.String uri)
Finds a latest version of the library with the given URI.

Parameters:
uri -
Returns:

getLibraryFromURI

public JspLibrary getLibraryFromURI(java.lang.String uri,
                                    java.lang.String version)
Finds a given version of the library with the given URI.

Parameters:
uri -
Returns:

getLibrariesFromURI

public java.util.Collection<JspLibrary> getLibrariesFromURI(java.lang.String uri)
Finds all versions of the library with the given URI.

Parameters:
uri -
Returns:

getAllLibraries

public java.util.Collection<JspLibrary> getAllLibraries()
Return all installed Tag Libraries.

Returns:
list containing JspLibrary objects

getLatestLibraryVersions

public java.util.Collection<JspLibrary> getLatestLibraryVersions()
Return latest versions of all installed Tag Libraries.

Returns:
list containing JspLibrary objects

getPrefixFromURI

public java.lang.String getPrefixFromURI(java.lang.String uri)
Given a JSP tag library URI returns preffered prefix for its latest version.

Parameters:
uri -
Returns:
null if there is not tag library registered for the given uri

isEditable

public boolean isEditable(JspLibrary library)

getPackagedLibraries

public java.util.Collection<JspLibrary> getPackagedLibraries(java.net.URL archiveURL)
Returns all tag libraries registered with the manager that are packaged in the given archive.

Parameters:
archiveURL - URL of the archive file

getUnpackagedLibrary

public JspLibrary getUnpackagedLibrary(java.net.URL tldURL)

getKnownLibraryAnnotations

public static java.net.URL getKnownLibraryAnnotations(JspLibrary library)

registerKnownLibraryAnnotations

public static void registerKnownLibraryAnnotations(java.lang.String tagLibUri,
                                                   java.net.URL url)
Registers location of the standalone metadata annotation file that contains metadata for tag library identified by the URI.


registerKnownLibraryAnnotations

public static void registerKnownLibraryAnnotations(java.lang.String tagLibUri,
                                                   java.lang.String libVersion,
                                                   java.net.URL url)

getKnownLibrarySchema

public static java.net.URL getKnownLibrarySchema(JspLibrary library)

registerKnownLibrarySchema

public static void registerKnownLibrarySchema(java.lang.String tagLibUri,
                                              java.net.URL url)
Registers location of the schema file that contains grammar definition for tag library identified by the URI. Provided schema must contain all grammar information available in the TLD file, and may define additional rules that are more restrictive than those from TLD file.


registerKnownLibrarySchema

public static void registerKnownLibrarySchema(java.lang.String tagLibUri,
                                              java.lang.String libVersion,
                                              java.net.URL url)

registerLibraryIndexingMetadata

public static void registerLibraryIndexingMetadata(java.lang.String tagLibUri,
                                                   java.net.URL url)

getLibraryIndexingMetadata

public static java.net.URL getLibraryIndexingMetadata(java.lang.String tagLibUri)

getIndexingMetadata

public static java.util.Collection<java.net.URL> getIndexingMetadata()

addJspLibraryEventListener

public void addJspLibraryEventListener(JspLibraryEventListener listener)
Add a JspLibraryEventListener to the JspLibraryManager.

Parameters:
listener - the listener to add.

removeJspLibraryEventListener

public void removeJspLibraryEventListener(JspLibraryEventListener listener)
Remove a JspLibraryEventListener from the JspLibraryManager.

Parameters:
listener - the listener to remove.

notifyObserversJspLibraryCreateEvents

public void notifyObserversJspLibraryCreateEvents(oracle.jdevimpl.webapp.jsp.libraries.model.JspLibraryListWrapper jspLibraryListWrapper,
                                                  JspLibrary library)
If library is created, notification is sent to Observers before its added


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.