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

E13403-08

oracle.jdeveloper.jsp.utils
Class JSPTagUtils

java.lang.Object
  extended by oracle.jdeveloper.jsp.utils.JSPTagUtils

public final class JSPTagUtils
extends java.lang.Object

The JSPTagUtils class is a utility class to insert/remove tags and their associated taglib declarations into the CodeEditor.


Nested Class Summary
static class JSPTagUtils.JspLibraryComparator
           
 
Method Summary
static void addTaglibDefinitionToActiveProject(java.lang.String uri, java.lang.String archiveLocation)
          Deprecated.  
static void addTagLibMap(Project prj, oracle.jdeveloper.xml.j2ee.war.WebAppNode webAppNode, java.lang.String taglibUri, java.lang.String taglibLocation)
          Inserts new explicit tag-lib entry in the web.xml file.
static void addTld(JspLibrary jspLib, Project prj)
          Deprecated. use updateProjectWithTagLibrary() method to add tag library to the project. It will do all needed actions.
static JspLibrary getJspLibrary(java.lang.String libraryName)
          Returns the latest version of the system tag library with the given name.
static JspLibrary getJspLibrary(java.lang.String libraryName, Project project)
          If a tag library with given name is used in the project, returns that library.
static JspLibrary getJspLibraryByPrefix(java.lang.String prefix, Context context)
           
static JspLibrary getJspLibraryByURI(java.lang.String uri)
          Returns the latest version of the system tag library with the given URI.
static JspLibrary getJspLibraryByURI(java.lang.String uri, Project project)
          If a tag library with given URI is used in the project, returns that library.
static java.io.InputStream getLibraryInputStream(java.lang.String tldURL)
          Retrieve InputStream for Tag Library
static java.net.URL getTaglibDescriptorArchiveURL(java.lang.String tldURL)
          Returns URL of the archive file containing TLD file.
static java.net.URL getTaglibDescriptorArchiveURL(java.net.URL tldLocation)
           
static java.net.URL getTaglibDescriptorURL(java.lang.String tldURL)
          Returns a URL pointing to the TLD file given by the tldURL.
static java.net.URL getTaglibJarURL(java.net.URL tldLocation)
           
static java.net.URL getWebInfLibURL(Project project)
          Returns the current WEB-INF/lib directory of the project.
static java.net.URL getWebInfURL(Project project)
          Returns the current WEB-INF directory of the project.
static void removeTagLibMap(oracle.jdeveloper.xml.j2ee.war.WebAppNode webAppNode, java.lang.String taglibUri)
          Removes explicit tag-lib entry from the web.xml file.
static boolean unregisterTagLibrary(Context context, java.lang.String libraryName)
          Deprecated.  
static void updateProjectWithTagLibraries(JspLibrary[] jspLibs, Project project)
           
static void updateProjectWithTagLibrary(JspLibrary jspLib, Project project)
          Updates project with the current Jsplibrary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWebInfURL

public static final java.net.URL getWebInfURL(Project project)
Returns the current WEB-INF directory of the project.

Parameters:
project - The current project
Returns:
url The WEB-INF url.

getWebInfLibURL

public static final java.net.URL getWebInfLibURL(Project project)
Returns the current WEB-INF/lib directory of the project.

Parameters:
project - The current project
Returns:
url The WEB-INF/lib url.

getJspLibrary

public static final JspLibrary getJspLibrary(java.lang.String libraryName)
Returns the latest version of the system tag library with the given name.

Parameters:
libraryName -
Returns:

getJspLibrary

public static final JspLibrary getJspLibrary(java.lang.String libraryName,
                                             Project project)
If a tag library with given name is used in the project, returns that library. Otherwis,e returns the latest version of the system tag library with the given name that can work within the given project.

Parameters:
libraryName -
project -
Returns:

getJspLibraryByURI

public static final JspLibrary getJspLibraryByURI(java.lang.String uri)
Returns the latest version of the system tag library with the given URI.

Parameters:
uri -
Returns:

getJspLibraryByURI

public static final JspLibrary getJspLibraryByURI(java.lang.String uri,
                                                  Project project)
If a tag library with given URI is used in the project, returns that library. Otherwise returns the latest version of the system tag library with the given URI that can work within the given project.

Parameters:
uri -
project -
Returns:

getJspLibraryByPrefix

public static final JspLibrary getJspLibraryByPrefix(java.lang.String prefix,
                                                     Context context)

getTaglibDescriptorURL

public static java.net.URL getTaglibDescriptorURL(java.lang.String tldURL)
Returns a URL pointing to the TLD file given by the tldURL. URL can be an entry inside an archive or a TLD file.


getLibraryInputStream

public static java.io.InputStream getLibraryInputStream(java.lang.String tldURL)
Retrieve InputStream for Tag Library


getTaglibDescriptorArchiveURL

public static java.net.URL getTaglibDescriptorArchiveURL(java.lang.String tldURL)
Returns URL of the archive file containing TLD file.

Returns:
null if tldURL is not valid entry inside an archive

getTaglibJarURL

public static java.net.URL getTaglibJarURL(java.net.URL tldLocation)
Parameters:
tldLocation -
Returns:
JAR URL

getTaglibDescriptorArchiveURL

public static java.net.URL getTaglibDescriptorArchiveURL(java.net.URL tldLocation)
Parameters:
tldLocation -
Returns:
jar file URL

updateProjectWithTagLibrary

public static final void updateProjectWithTagLibrary(JspLibrary jspLib,
                                                     Project project)
Updates project with the current Jsplibrary. This does not effect code generation. Adds an archive to the web-inf lib directory and adds archive to project. Updates web.xml if necessary. If library is not globally defined, adding it will be ignored. (NOT - TODO)

Parameters:
jspLib - - the Jsplibary to add to project
project - - the project to add Jsplibrary to.

updateProjectWithTagLibraries

public static final void updateProjectWithTagLibraries(JspLibrary[] jspLibs,
                                                       Project project)

addTld

public static final void addTld(JspLibrary jspLib,
                                Project prj)
Deprecated. use updateProjectWithTagLibrary() method to add tag library to the project. It will do all needed actions.

Updates the project to handle the specified JSP Tag Library. This method will handle 3 different types of Tag Libraries.
1) Spec. 1.1 taglib where the file is named taglib.tld and exists under meta-inf in an archive.
2) Handle implicit taglibs as specified by spec. 1.2. This handles the uri specified in that taglib.
3) Handle explicit taglibs where the registered does not match the one found in the taglib itself.

Parameters:
jspLib - The JSP Tag Library to add to the project
prj - The project to update.

unregisterTagLibrary

public static boolean unregisterTagLibrary(Context context,
                                           java.lang.String libraryName)
Deprecated. 

Removes all reference of a tag library from the web deployment descriptor as well as from the additional classpath.


addTaglibDefinitionToActiveProject

public static void addTaglibDefinitionToActiveProject(java.lang.String uri,
                                                      java.lang.String archiveLocation)
Deprecated. 

Add taglib definition to web descriptor file


addTagLibMap

public static void addTagLibMap(Project prj,
                                oracle.jdeveloper.xml.j2ee.war.WebAppNode webAppNode,
                                java.lang.String taglibUri,
                                java.lang.String taglibLocation)
Inserts new explicit tag-lib entry in the web.xml file.


removeTagLibMap

public static void removeTagLibMap(oracle.jdeveloper.xml.j2ee.war.WebAppNode webAppNode,
                                   java.lang.String taglibUri)
Removes explicit tag-lib entry from the web.xml file.


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.