public abstract class FieldComponent extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FieldComponent.ClientLibraryType |
| Constructor and Description |
|---|
FieldComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClientLibraries(FieldComponent.ClientLibraryType type,
Collection<String> categories) |
void |
addClientLibraries(FieldComponent.ClientLibraryType type,
String... categories) |
void |
addClientLibraries(FieldComponent component) |
void |
addClientLibrary(String category) |
org.apache.sling.api.resource.Resource |
buildComponentResource()
If your component needs child nodes then override this method, call the
superclass implementation, and then use addChildren to add additional
nodes to it.
|
AccessibleObject |
getAccessibleObject() |
Optional<Boolean> |
getBooleanOption(String option) |
String |
getCategory() |
Map<FieldComponent.ClientLibraryType,Set<String>> |
getClientLibraryCategories() |
org.apache.sling.api.resource.ResourceMetadata |
getComponentMetadata() |
Field |
getField()
Deprecated.
Use getAccessibleObject and AccessibleObjectUtils to handle both Method (getter) or Fields
|
FormField |
getFieldDefinition() |
org.apache.sling.api.scripting.SlingScriptHelper |
getHelper() |
String |
getHtml() |
String |
getName() |
Optional<String> |
getOption(String option) |
Collection<String> |
getOptionNames() |
String |
getPath() |
String |
getResourceSuperType() |
String |
getResourceType() |
boolean |
hasOption(String optionName) |
abstract void |
init() |
void |
purgeEmptyMetadata() |
void |
setCategory(String category) |
void |
setHelper(org.apache.sling.api.scripting.SlingScriptHelper helper) |
void |
setPath(String path) |
void |
setResourceSuperType(String resourceSuperType) |
void |
setResourceType(String resourceType) |
void |
setup(String name,
AccessibleObject fieldOrMethod,
FormField field,
org.apache.sling.api.scripting.SlingScriptHelper sling) |
public final void setup(String name, AccessibleObject fieldOrMethod, FormField field, org.apache.sling.api.scripting.SlingScriptHelper sling)
public abstract void init()
public final void setHelper(org.apache.sling.api.scripting.SlingScriptHelper helper)
public final org.apache.sling.api.scripting.SlingScriptHelper getHelper()
public final void setPath(String path)
public final String getPath()
@Deprecated public final Field getField()
public final AccessibleObject getAccessibleObject()
public final FormField getFieldDefinition()
public final String getHtml()
public org.apache.sling.api.resource.Resource buildComponentResource()
public final org.apache.sling.api.resource.ResourceMetadata getComponentMetadata()
public final Map<FieldComponent.ClientLibraryType,Set<String>> getClientLibraryCategories()
public final void addClientLibrary(String category)
public final void addClientLibraries(FieldComponent.ClientLibraryType type, String... categories)
public final void addClientLibraries(FieldComponent.ClientLibraryType type, Collection<String> categories)
public final void addClientLibraries(FieldComponent component)
public final String getResourceType()
public final void setResourceType(String resourceType)
resourceType - the resourceType to setpublic final String getResourceSuperType()
public final void setResourceSuperType(String resourceSuperType)
resourceSuperType - the resourceSuperType to setpublic final void purgeEmptyMetadata()
public final String getName()
public final Collection<String> getOptionNames()
public final boolean hasOption(String optionName)
public final String getCategory()
public final void setCategory(String category)
category - the category to setCopyright © 2013–2020 Adobe. All rights reserved.