Tabnine Logo
com.ocpsoft.pretty.faces.config.annotation
Code IndexAdd Tabnine to your IDE (free)

How to use com.ocpsoft.pretty.faces.config.annotation

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

origin: ocpsoft/prettyfaces

/**
* Initialization procedure
* 
* @param servletContext
*           The {@link ServletContext} of the web application.
* @param classLoader
*           The {@link ClassLoader} to use for loading classes
* @param packageFilter
*           The {@link PackageFilter} used to check if a package has to be
*           scanned.
*/
public AbstractClassFinder(ServletContext servletContext, ClassLoader classLoader, PackageFilter packageFilter)
{
 this.servletContext = servletContext;
 this.classLoader = classLoader;
 this.packageFilter = packageFilter;
 this.byteCodeAnnotationFilter = new ByteCodeAnnotationFilter();
}
origin: ocpsoft/prettyfaces

String result = stripKnownPrefix(path, CLASSES_FOLDER);
  result = stripKnownPrefix(path, classesFolderPath);
origin: ocpsoft/prettyfaces

/**
* Checks if a supplied class has to be processed by checking the package
* name against the {@link PackageFilter}.
* 
* @param className
*           FQCN of the class
* @return <code>true</code> for classes to process, <code>false</code> for
*         classes to ignore
*/
protected boolean mustProcessClass(String className)
{
 // the default package
 String packageName = "";
 // find last dot in class name to determine the package name
 int packageEndIndex = className.lastIndexOf(".");
 if (packageEndIndex != -1)
 {
   packageName = className.substring(0, packageEndIndex);
 }
 // check filter
 return packageFilter.isAllowedPackage(packageName);
}
origin: ocpsoft/rewrite

ActionSpec actionSpec = new ActionSpec();
actionSpec.setMethod(method);
actionSpec.setOnPostback(actionAnnotation.onPostback());
actionSpec.setInheritable(actionAnnotation.inheritable());
actionSpec.setPhaseId(actionAnnotation.phaseId());
if (!isBlank(actionAnnotation.mappingId()))
  actionSpec.setMappingIds(new String[] { actionAnnotation.mappingId().trim() });
  actionSpec.setMappingIds(classMappingIds);
origin: ocpsoft/prettyfaces

PackageFilter packageFilter = new PackageFilter(packageFilters);
LazyBeanNameFinder beanNameFinder = new LazyBeanNameFinder(servletContext);
PrettyAnnotationHandler annotationHandler = new PrettyAnnotationHandler(beanNameFinder);
classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter));
if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
  classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter));
  finder.findClasses(annotationHandler);
annotationHandler.build(builder);
return builder.build();
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Searches for {@link URLAction} or {@link URLActions} annotations on a
* method.
* 
* @param method Method to scan
* @param classMappingIds The mapping IDs of the class this method belongs to
*/
private void processMethodAnnotations(Method method, String[] classMappingIds)
{
 // is there a @URLAction annotation on the class?
 URLAction actionAnnotation = method.getAnnotation(URLAction.class);
 if (actionAnnotation != null)
 {
   processPrettyActionAnnotation(actionAnnotation, method, classMappingIds);
 }
 // is there a @URLAction container annotation on the class?
 URLActions actionsAnnotation = method.getAnnotation(URLActions.class);
 if (actionsAnnotation != null)
 {
   // process all @URLAction annotations
   for (URLAction child : actionsAnnotation.actions())
   {
    processPrettyActionAnnotation(child, method, classMappingIds);
   }
 }
}
origin: ocpsoft/prettyfaces

public void findClasses(PrettyAnnotationHandler handler)
{
 try
 {
   // we start the recursive scan in the classes folder
   URL classesFolderUrl = servletContext.getResource(CLASSES_FOLDER);
   // abort if classes folder is missing
   if (classesFolderUrl == null)
   {
    log.warn("Cannot find classes folder: " + CLASSES_FOLDER);
    return;
   }
   // call recursive directory processing method
   processDirectory(classesFolderUrl, classesFolderUrl, handler);
 }
 catch (MalformedURLException e)
 {
   throw new IllegalStateException("Invalid URL: " + e.getMessage(), e);
 }
}
origin: com.ocpsoft/prettyfaces-jsf2

PackageFilter packageFilter = new PackageFilter(packageFilters);
LazyBeanNameFinder beanNameFinder = new LazyBeanNameFinder(servletContext);
PrettyAnnotationHandler annotationHandler = new PrettyAnnotationHandler(beanNameFinder);
classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter));
if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
  classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter));
  finder.findClasses(annotationHandler);
annotationHandler.build(builder);
return builder.build();
origin: ocpsoft/prettyfaces

/**
* Searches for {@link URLAction} or {@link URLActions} annotations on a
* method.
* 
* @param method Method to scan
* @param classMappingIds The mapping IDs of the class this method belongs to
*/
private void processMethodAnnotations(Method method, String[] classMappingIds)
{
 // is there a @URLAction annotation on the class?
 URLAction actionAnnotation = method.getAnnotation(URLAction.class);
 if (actionAnnotation != null)
 {
   processPrettyActionAnnotation(actionAnnotation, method, classMappingIds);
 }
 // is there a @URLAction container annotation on the class?
 URLActions actionsAnnotation = method.getAnnotation(URLActions.class);
 if (actionsAnnotation != null)
 {
   // process all @URLAction annotations
   for (URLAction child : actionsAnnotation.actions())
   {
    processPrettyActionAnnotation(child, method, classMappingIds);
   }
 }
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Initialization procedure
* 
* @param servletContext
*           The {@link ServletContext} of the web application.
* @param classLoader
*           The {@link ClassLoader} to use for loading classes
* @param packageFilter
*           The {@link PackageFilter} used to check if a package has to be
*           scanned.
*/
public AbstractClassFinder(ServletContext servletContext, ClassLoader classLoader, PackageFilter packageFilter)
{
 this.servletContext = servletContext;
 this.classLoader = classLoader;
 this.packageFilter = packageFilter;
 this.byteCodeAnnotationFilter = new ByteCodeAnnotationFilter();
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Checks if a supplied class has to be processed by checking the package
* name against the {@link PackageFilter}.
* 
* @param className
*           FQCN of the class
* @return <code>true</code> for classes to process, <code>false</code> for
*         classes to ignore
*/
protected boolean mustProcessClass(String className)
{
 // the default package
 String packageName = "";
 // find last dot in class name to determine the package name
 int packageEndIndex = className.lastIndexOf(".");
 if (packageEndIndex != -1)
 {
   packageName = className.substring(0, packageEndIndex);
 }
 // check filter
 return packageFilter.isAllowedPackage(packageName);
}
origin: ocpsoft/prettyfaces

String result = stripKnownPrefix(path, CLASSES_FOLDER);
  result = stripKnownPrefix(path, classesFolderPath);
origin: com.ocpsoft/prettyfaces-jsf2

public void findClasses(PrettyAnnotationHandler handler)
{
 try
 {
   // we start the recursive scan in the classes folder
   URL classesFolderUrl = servletContext.getResource(CLASSES_FOLDER);
   // abort if classes folder is missing
   if (classesFolderUrl == null)
   {
    log.warn("Cannot find classes folder: " + CLASSES_FOLDER);
    return;
   }
   // call recursive directory processing method
   processDirectory(classesFolderUrl, classesFolderUrl, handler);
 }
 catch (MalformedURLException e)
 {
   throw new IllegalStateException("Invalid URL: " + e.getMessage(), e);
 }
}
origin: ocpsoft/prettyfaces

PackageFilter packageFilter = new PackageFilter(packageFilters);
LazyBeanNameFinder beanNameFinder = new LazyBeanNameFinder(servletContext);
PrettyAnnotationHandler annotationHandler = new PrettyAnnotationHandler(beanNameFinder);
classFinders.add(new WebClassesFinder(servletContext, classloader, packageFilter));
if ((jarConfig != null) && jarConfig.trim().equalsIgnoreCase("true"))
  classFinders.add(new WebLibFinder(servletContext, classloader, packageFilter));
  finder.findClasses(annotationHandler);
annotationHandler.build(builder);
return builder.build();
origin: ocpsoft/rewrite

/**
* Searches for {@link URLAction} or {@link URLActions} annotations on a method.
* 
* @param method Method to scan
* @param classMappingIds The mapping IDs of the class this method belongs to
*/
private void processMethodAnnotations(Method method, String[] classMappingIds)
{
 // is there a @URLAction annotation on the class?
 URLAction actionAnnotation = method.getAnnotation(URLAction.class);
 if (actionAnnotation != null)
 {
   processPrettyActionAnnotation(actionAnnotation, method, classMappingIds);
 }
 // is there a @URLAction container annotation on the class?
 URLActions actionsAnnotation = method.getAnnotation(URLActions.class);
 if (actionsAnnotation != null)
 {
   // process all @URLAction annotations
   for (URLAction child : actionsAnnotation.actions())
   {
    processPrettyActionAnnotation(child, method, classMappingIds);
   }
 }
}
origin: ocpsoft/prettyfaces

/**
* Initialization procedure
* 
* @param servletContext
*           The {@link ServletContext} of the web application.
* @param classLoader
*           The {@link ClassLoader} to use for loading classes
* @param packageFilter
*           The {@link PackageFilter} used to check if a package has to be
*           scanned.
*/
public AbstractClassFinder(ServletContext servletContext, ClassLoader classLoader, PackageFilter packageFilter)
{
 this.servletContext = servletContext;
 this.classLoader = classLoader;
 this.packageFilter = packageFilter;
 this.byteCodeAnnotationFilter = new ByteCodeAnnotationFilter();
}
origin: ocpsoft/prettyfaces

/**
* Checks if a supplied class has to be processed by checking the package
* name against the {@link PackageFilter}.
* 
* @param className
*           FQCN of the class
* @return <code>true</code> for classes to process, <code>false</code> for
*         classes to ignore
*/
protected boolean mustProcessClass(String className)
{
 // the default package
 String packageName = "";
 // find last dot in class name to determine the package name
 int packageEndIndex = className.lastIndexOf(".");
 if (packageEndIndex != -1)
 {
   packageName = className.substring(0, packageEndIndex);
 }
 // check filter
 return packageFilter.isAllowedPackage(packageName);
}
origin: com.ocpsoft/prettyfaces-jsf2

String result = stripKnownPrefix(path, CLASSES_FOLDER);
  result = stripKnownPrefix(path, classesFolderPath);
origin: ocpsoft/prettyfaces

public void findClasses(PrettyAnnotationHandler handler)
{
 try
 {
   // we start the recursive scan in the classes folder
   URL classesFolderUrl = servletContext.getResource(CLASSES_FOLDER);
   // abort if classes folder is missing
   if (classesFolderUrl == null)
   {
    log.warn("Cannot find classes folder: " + CLASSES_FOLDER);
    return;
   }
   // call recursive directory processing method
   processDirectory(classesFolderUrl, classesFolderUrl, handler);
 }
 catch (MalformedURLException e)
 {
   throw new IllegalStateException("Invalid URL: " + e.getMessage(), e);
 }
}
origin: ocpsoft/prettyfaces

/**
* Searches for {@link URLAction} or {@link URLActions} annotations on a
* method.
* 
* @param method Method to scan
* @param classMappingIds The mapping IDs of the class this method belongs to
*/
private void processMethodAnnotations(Method method, String[] classMappingIds)
{
 // is there a @URLAction annotation on the class?
 URLAction actionAnnotation = method.getAnnotation(URLAction.class);
 if (actionAnnotation != null)
 {
   processPrettyActionAnnotation(actionAnnotation, method, classMappingIds);
 }
 // is there a @URLAction container annotation on the class?
 URLActions actionsAnnotation = method.getAnnotation(URLActions.class);
 if (actionsAnnotation != null)
 {
   // process all @URLAction annotations
   for (URLAction child : actionsAnnotation.actions())
   {
    processPrettyActionAnnotation(child, method, classMappingIds);
   }
 }
}
com.ocpsoft.pretty.faces.config.annotation

Most used classes

  • PrettyAnnotationHandler$ActionSpec
    Internal class to hold parameters of a URLAction annotation.
  • PrettyAnnotationHandler$QueryParamSpec
    Internal class to hold parameters of a Pretty annotation.
  • PrettyAnnotationHandler
  • ByteCodeAnnotationFilter
    This class reads Java class files and checks whether they contain references to PrettyFaces annotat
  • ClassFinder
    Common interface for implementations that scan for classes on the classpath.
  • WebClassesFinder,
  • WebLibFinder
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