Tabnine Logo
ParentingPostProcessor
Code IndexAdd Tabnine to your IDE (free)

How to use
ParentingPostProcessor
in
com.ocpsoft.pretty.faces.config.spi

Best Java code snippets using com.ocpsoft.pretty.faces.config.spi.ParentingPostProcessor (Showing top 20 results out of 315)

origin: com.ocpsoft/prettyfaces-jsf2

private void mergeQueryParams(UrlMapping parent, UrlMapping child)
{
 List<QueryParameter> result = new ArrayList<QueryParameter>();
 for (QueryParameter queryParam : parent.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 for (QueryParameter queryParam : child.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 child.setQueryParams(result);
}
origin: ocpsoft/prettyfaces

public PrettyConfig processConfiguration(ServletContext context, PrettyConfig config)
{
 String enabled = context.getInitParameter(HIERARCHY_ENABLED_PARAM);
 if ((enabled != null) && "false".equalsIgnoreCase(enabled.trim()))
 {
   return config;
 }
 List<UrlMapping> mappings = config.getMappings();
 for (UrlMapping m : mappings)
 {
   createAncestry(config, m);
 }
 return config;
}
origin: ocpsoft/prettyfaces

private void createAncestry(PrettyConfig config, UrlMapping m)
{
 if (m.hasParent() && !seen.contains(m))
 {
   UrlMapping parent = config.getMappingById(m.getParentId());
   if (parent == null)
   {
    throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":"
       + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration.");
   }
   if (parent.hasParent())
   {
    createAncestry(config, parent);
   }
   m.setPattern(parent.getPattern() + m.getPattern());
   mergeValidators(parent, m);
   mergeActions(parent, m);
   mergeQueryParams(parent, m);
   seen.add(m);
 }
}
origin: ocpsoft/prettyfaces

ConfigurationPostProcessor parenting = new ParentingPostProcessor();
origin: com.ocpsoft/prettyfaces-jsf2

private void createAncestry(PrettyConfig config, UrlMapping m)
{
 if (m.hasParent() && !seen.contains(m))
 {
   UrlMapping parent = config.getMappingById(m.getParentId());
   if (parent == null)
   {
    throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":"
       + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration.");
   }
   if (parent.hasParent())
   {
    createAncestry(config, parent);
   }
   m.setPattern(parent.getPattern() + m.getPattern());
   mergeValidators(parent, m);
   mergeActions(parent, m);
   mergeQueryParams(parent, m);
   seen.add(m);
 }
}
origin: ocpsoft/prettyfaces

ConfigurationPostProcessor parenting = new ParentingPostProcessor();
origin: ocpsoft/prettyfaces

private void createAncestry(PrettyConfig config, UrlMapping m)
{
 if (m.hasParent() && !seen.contains(m))
 {
   UrlMapping parent = config.getMappingById(m.getParentId());
   if (parent == null)
   {
    throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":"
       + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration.");
   }
   if (parent.hasParent())
   {
    createAncestry(config, parent);
   }
   m.setPattern(parent.getPattern() + m.getPattern());
   mergeValidators(parent, m);
   mergeActions(parent, m);
   mergeQueryParams(parent, m);
   seen.add(m);
 }
}
origin: ocpsoft/rewrite

private void mergeQueryParams(UrlMapping parent, UrlMapping child)
{
 List<QueryParameter> result = new ArrayList<QueryParameter>();
 for (QueryParameter queryParam : parent.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 for (QueryParameter queryParam : child.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 child.setQueryParams(result);
}
origin: com.ocpsoft/prettyfaces-jsf2

public PrettyConfig processConfiguration(ServletContext context, PrettyConfig config)
{
 String enabled = context.getInitParameter(HIERARCHY_ENABLED_PARAM);
 if ((enabled != null) && "false".equalsIgnoreCase(enabled.trim()))
 {
   return config;
 }
 List<UrlMapping> mappings = config.getMappings();
 for (UrlMapping m : mappings)
 {
   createAncestry(config, m);
 }
 return config;
}
origin: ocpsoft/rewrite

ConfigurationPostProcessor parenting = new ParentingPostProcessor();
origin: ocpsoft/rewrite

private void createAncestry(PrettyConfig config, UrlMapping m)
{
 if (m.hasParent() && !seen.contains(m))
 {
   UrlMapping parent = config.getMappingById(m.getParentId());
   if (parent == null)
   {
    throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":"
         + m.getPattern() + "] - the requested parentId [" + m.getParentId()
         + "] does not exist in the configuration.");
   }
   if (parent.hasParent())
   {
    createAncestry(config, parent);
   }
   m.setPattern(parent.getPattern() + m.getPattern());
   mergeValidators(parent, m);
   mergeActions(parent, m);
   mergeQueryParams(parent, m);
   seen.add(m);
 }
}
origin: ocpsoft/prettyfaces

private void mergeQueryParams(UrlMapping parent, UrlMapping child)
{
 List<QueryParameter> result = new ArrayList<QueryParameter>();
 for (QueryParameter queryParam : parent.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 for (QueryParameter queryParam : child.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 child.setQueryParams(result);
}
origin: ocpsoft/rewrite

@Override
public PrettyConfig processConfiguration(ServletContext context, PrettyConfig config)
{
 String enabled = context.getInitParameter(HIERARCHY_ENABLED_PARAM);
 if ((enabled != null) && "false".equalsIgnoreCase(enabled.trim()))
 {
   return config;
 }
 List<UrlMapping> mappings = config.getMappings();
 for (UrlMapping m : mappings)
 {
   createAncestry(config, m);
 }
 return config;
}
origin: com.ocpsoft/prettyfaces-jsf2

ConfigurationPostProcessor parenting = new ParentingPostProcessor();
origin: ocpsoft/prettyfaces

private void mergeQueryParams(UrlMapping parent, UrlMapping child)
{
 List<QueryParameter> result = new ArrayList<QueryParameter>();
 for (QueryParameter queryParam : parent.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 for (QueryParameter queryParam : child.getQueryParams())
 {
   if (!result.contains(queryParam))
   {
    result.add(copy(queryParam));
   }
 }
 child.setQueryParams(result);
}
origin: ocpsoft/prettyfaces

public PrettyConfig processConfiguration(ServletContext context, PrettyConfig config)
{
 String enabled = context.getInitParameter(HIERARCHY_ENABLED_PARAM);
 if ((enabled != null) && "false".equalsIgnoreCase(enabled.trim()))
 {
   return config;
 }
 List<UrlMapping> mappings = config.getMappings();
 for (UrlMapping m : mappings)
 {
   createAncestry(config, m);
 }
 return config;
}
origin: ocpsoft/prettyfaces

private void mergeActions(UrlMapping parent, UrlMapping child)
{
 List<UrlAction> result = new ArrayList<UrlAction>();
 for (UrlAction action : parent.getActions())
 {
   if (!result.contains(action) && action.isInheritable())
   {
    result.add(copy(action));
   }
 }
 for (UrlAction action : child.getActions())
 {
   if (!result.contains(action))
   {
    result.add(copy(action));
   }
 }
 child.setActions(result);
}
origin: com.ocpsoft/prettyfaces-jsf2

private void mergeActions(UrlMapping parent, UrlMapping child)
{
 List<UrlAction> result = new ArrayList<UrlAction>();
 for (UrlAction action : parent.getActions())
 {
   if (!result.contains(action) && action.isInheritable())
   {
    result.add(copy(action));
   }
 }
 for (UrlAction action : child.getActions())
 {
   if (!result.contains(action))
   {
    result.add(copy(action));
   }
 }
 child.setActions(result);
}
origin: ocpsoft/rewrite

private void mergeActions(UrlMapping parent, UrlMapping child)
{
 List<UrlAction> result = new ArrayList<UrlAction>();
 for (UrlAction action : parent.getActions())
 {
   if (!result.contains(action) && action.isInheritable())
   {
    result.add(copy(action));
   }
 }
 for (UrlAction action : child.getActions())
 {
   if (!result.contains(action))
   {
    result.add(copy(action));
   }
 }
 child.setActions(result);
}
origin: ocpsoft/prettyfaces

private void mergeActions(UrlMapping parent, UrlMapping child)
{
 List<UrlAction> result = new ArrayList<UrlAction>();
 for (UrlAction action : parent.getActions())
 {
   if (!result.contains(action) && action.isInheritable())
   {
    result.add(copy(action));
   }
 }
 for (UrlAction action : child.getActions())
 {
   if (!result.contains(action))
   {
    result.add(copy(action));
   }
 }
 child.setActions(result);
}
com.ocpsoft.pretty.faces.config.spiParentingPostProcessor

Most used methods

  • <init>
  • copy
  • createAncestry
  • mergeActions
  • mergeQueryParams
  • mergeValidators

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • String (java.lang)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JFrame (javax.swing)
  • Option (scala)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now