Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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 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[] configureProjectWithTagLibraries(JspLibrary[] jspLibs, Project project, boolean ignoreExistingURIs)
           
static JspLibrary[] configureProjectWithTagLibrary(JspLibrary jspLib, Project project, boolean ignoreExistingURI)
          Adds given library to the project, and setting up all required dependencies which may include: java libraries, other tag libraries, and craation and configuration of deployment files.
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 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)

configureProjectWithTagLibrary

public static JspLibrary[] configureProjectWithTagLibrary(JspLibrary jspLib,
                                                          Project project,
                                                          boolean ignoreExistingURI)
Adds given library to the project, and setting up all required dependencies which may include: java libraries, other tag libraries, and craation and configuration of deployment files. If the project already contains tag library defined by the same tld URL as the given library, this method will not update the project. Note that this mean that if the project uses given tag library but is miconfigured, calling the method will not reconfigure it.
Parameters:
jspLib -
project -
ignoreExistingURI - Instead of testing fore existance of the tag library at the same location, just checks the URI.
Returns:

configureProjectWithTagLibraries

public static JspLibrary[] configureProjectWithTagLibraries(JspLibrary[] jspLibs,
                                                            Project project,
                                                            boolean ignoreExistingURIs)
Parameters:
jspLibs -
project -
ignoreExistingURIs -
Returns:
See Also:
configureProjectWithTagLibrary(JspLibrary, Project, boolean)

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.

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.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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