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

E17493-01

oracle.jdeveloper.webapp.facelets
Class FaceletsConfigurationManager

java.lang.Object
  extended by oracle.jdeveloper.webapp.facelets.FaceletsConfigurationManager

public final class FaceletsConfigurationManager
extends java.lang.Object


Nested Class Summary
static class FaceletsConfigurationManager.FaceletsConfiguration
           
 
Method Summary
 boolean addFaceletsSuffix(Project project, java.lang.String suffix, boolean makeDefault)
          Add the suffix to the configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS" If makeDefault is true, the suffix is prepended to the FACELETS_VIEW_MAPPINGS, so that it is returned by getDefaultFaceletsSuffix()
 void configureProject(Project project)
          Configure the Project for Facelets
 boolean creatingJSFCheckForFaceletsCheck(Context context)
          Deprecated. 
 java.lang.String getDefaultFaceletsSuffix(Project project)
          Determine the default Facelets Suffix, as defined for the Project
 FaceletsConfigurationManager.FaceletsConfiguration getFaceletsConfiguration(Context projectContext)
          Determine if the Project has been configured for Facelets.
static FaceletsConfigurationManager getFaceletsConfigurationManager()
           
 java.util.Collection<java.lang.String> getFaceletsSuffixes(Project project)
          Get the list of suffixes configured in the configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS"
 boolean isConfiguredForFacelets(Context projectContext)
          Determine if the Project is configured to use Facelets.
 boolean isConfiguredForFacelets(Context projectContext, boolean defaultOk)
          Determine if the Project is configured to use Facelets.
 boolean isConfiguredForFacelets(Project project)
          Deprecated. 
 boolean isFaceletsFile(Project project, java.net.URL url)
          Determine if the URL is a Facelets file.
 boolean isFaceletsFile(Project project, java.net.URL url, boolean checkDefaults)
          Determine if the URL is a Facelets file.
 boolean isFaceletsPage(Context context)
          Determines if the context's node is a Facelets node.
 boolean isFaceletsSuffix(Project project, java.lang.String suffix, boolean checkDefaults)
          Determine if the suffix corresponds to a Facelets view mapping suffix.
 void registerFaceletsConfigurationHandler(MetaClass<FaceletsConfigurationHandler> factory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFaceletsConfigurationManager

public static FaceletsConfigurationManager getFaceletsConfigurationManager()

registerFaceletsConfigurationHandler

public void registerFaceletsConfigurationHandler(MetaClass<FaceletsConfigurationHandler> factory)

isConfiguredForFacelets

public boolean isConfiguredForFacelets(Context projectContext)
Determine if the Project is configured to use Facelets. Returns false if the project has facelets disabled or simply hasn't been explicitly configured. (if FaceletsConfiguration is greater than DEFAULT_CONFIGURED)

Parameters:
projectContext -
Returns:

isConfiguredForFacelets

public boolean isConfiguredForFacelets(Context projectContext,
                                       boolean defaultOk)
Determine if the Project is configured to use Facelets. Returns false if the project has facelets disabled or simply hasn't been explicitly configured. if defaultOk is true, returns true if the Project is >= DEFAULT_CONFIGURED Otherwise returns true only if the Project is > DEFAULT_CONFIGURED

Parameters:
projectContext -
Returns:

getFaceletsConfiguration

public FaceletsConfigurationManager.FaceletsConfiguration getFaceletsConfiguration(Context projectContext)
Determine if the Project has been configured for Facelets.

Parameters:
projectContext -
Returns:

isConfiguredForFacelets

@Deprecated
public boolean isConfiguredForFacelets(Project project)
Deprecated. 

Determine if the Project is configured to use Facelets. Returns false if the project has facelets disabled or simply hasn't been explicitly configured. (if FaceletsConfiguration is greater than DEFAULT_CONFIGURED)

Parameters:
project -
Returns:

configureProject

public void configureProject(Project project)
Configure the Project for Facelets

Parameters:
project -

addFaceletsSuffix

public boolean addFaceletsSuffix(Project project,
                                 java.lang.String suffix,
                                 boolean makeDefault)
Add the suffix to the configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS" If makeDefault is true, the suffix is prepended to the FACELETS_VIEW_MAPPINGS, so that it is returned by getDefaultFaceletsSuffix()

Parameters:
project -
suffix -
makeDefault - if true, the suffix is prepended to the FACELETS_VIEW_MAPPINGS

getFaceletsSuffixes

public java.util.Collection<java.lang.String> getFaceletsSuffixes(Project project)
Get the list of suffixes configured in the configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS"

Parameters:
project -
Returns:
Collection of suffixes. May be null.

isFaceletsFile

public boolean isFaceletsFile(Project project,
                              java.net.URL url,
                              boolean checkDefaults)
Determine if the URL is a Facelets file. Checks the URL against the prefixes and suffixes in configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS". If not present there, checks against the default Facelets Suffix If none of these match, and checkDefaults is true, then the URL is checked against the suffixes that would be added if the project is configured for default facelets by the registered FaceletsConfigurationHandlers FaceletsConfigurationHandler implementations may inspect the contents of the file to determine if the file is rendered in facelets. This is useful for fragment file types that aren't toplevel facelets so aren't wouldn't necessarily have a view mapping.

Parameters:
project -
url -
checkDefaults -
Returns:
true if the url is a facelets file

isFaceletsFile

public boolean isFaceletsFile(Project project,
                              java.net.URL url)
Determine if the URL is a Facelets file. Checks the URL against the prefixes and suffixes in configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS". If not present there, checks against the default Facelets Suffix FaceletsConfigurationHandler implementations may inspect the contents of the file to determine if the file is rendered in facelets. This is useful for fragment file types that aren't toplevel facelets so aren't wouldn't necessarily have a view mapping.

Parameters:
project -
url -
Returns:
true if the url is a facelets file

isFaceletsSuffix

public boolean isFaceletsSuffix(Project project,
                                java.lang.String suffix,
                                boolean checkDefaults)
Determine if the suffix corresponds to a Facelets view mapping suffix. Checks the suffix against the suffixes in configuration parameter "javax.faces.FACELETS_VIEW_MAPPINGS". If not present there, checks against the default Facelets Suffix If none of these match, and checkDefaults is true, then the suffix is checked against the suffixes that would be added if the project is configured for default facelets by the registered FaceletsConfigurationHandlers

Parameters:
project -
suffix -
checkDefaults -
Returns:
true if the url is a facelets file

getDefaultFaceletsSuffix

public java.lang.String getDefaultFaceletsSuffix(Project project)
Determine the default Facelets Suffix, as defined for the Project

Parameters:
project -
Returns:

isFaceletsPage

public boolean isFaceletsPage(Context context)
Determines if the context's node is a Facelets node. The node's XMLSourceNodeDelegate must be already setup.

Parameters:
context -
Returns:

creatingJSFCheckForFaceletsCheck

@Deprecated
public boolean creatingJSFCheckForFaceletsCheck(Context context)
Deprecated. 

Returns true if the context is configured for facelets, after alerting the user

Parameters:
context -
Returns:

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

E17493-01

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