public class DocumentParamsScanner extends Object
Constructor and Description |
---|
DocumentParamsScanner() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
findDocumentPathsRecursive(HstComponentConfiguration componentConfiguration,
ClassLoader classLoader)
Returns the document paths for
componentConfiguration including its descendant
HstComponentConfiguration s. |
static List<String> |
findDocumentPathsRecursive(HstComponentConfiguration componentConfiguration,
ClassLoader classLoader,
Predicate<HstComponentConfiguration> predicate)
Returns the same as
findDocumentPathsRecursive(org.hippoecm.hst.configuration.components.HstComponentConfiguration, ClassLoader)
only this time during recursive scanning of the componentConfiguration and its descendants, the scanning
can be stopped when the Predicate returns false for a HstComponentConfiguration |
static Set<String> |
getNames(String componentClassName,
ClassLoader classLoader) |
public static List<String> findDocumentPathsRecursive(HstComponentConfiguration componentConfiguration, ClassLoader classLoader)
componentConfiguration
including its descendant
HstComponentConfiguration
s. A document path is an method from the ParametersInfo
that is
either annotated with JcrPath
or DocumentLink
. The componentConfiguration
java
class will be loaded by the provided classLoader
componentConfiguration
- the root HstComponentConfiguration
for which all document paths will be
returned. All as in that also all descendant
HstComponentConfiguration
s are scanned.List
of document paths parameters for the componentConfiguration
including all its
descendant HstComponentConfiguration
s.public static List<String> findDocumentPathsRecursive(HstComponentConfiguration componentConfiguration, ClassLoader classLoader, Predicate<HstComponentConfiguration> predicate)
findDocumentPathsRecursive(org.hippoecm.hst.configuration.components.HstComponentConfiguration, ClassLoader)
only this time during recursive scanning of the componentConfiguration
and its descendants, the scanning
can be stopped when the Predicate
returns false for a HstComponentConfiguration
public static Set<String> getNames(String componentClassName, ClassLoader classLoader)
componentClassName
- the class name for which the ParametersInfo
is scannedSet
of parameter names that have either JcrPath
or DocumentLink
annotation
present. Returns empty set if and exception occurs (for example componentClassName
cannot be
instantiated) or no
ParametersInfo
is present on componentClassName
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.