com.citytechinc.aem.bedrock.api.components
Interface Component
- All Superinterfaces:
- Accessible, BasicNode, ComponentNode, ImageSource, Inheritable, Linkable, Traversable<ComponentNode>, io.sightly.java.api.Use
public interface Component
- extends ComponentNode, io.sightly.java.api.Use
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Accessible |
asMap, get, get, getAsHref, getAsHref, getAsHref, getAsLink, getAsLink, getAsLink, getAsList, getAsPage, getAsType, getImageReference, getImageReference, getImageRendition, getImageRendition |
| Methods inherited from interface com.citytechinc.aem.bedrock.api.Inheritable |
getAsHrefInherited, getAsHrefInherited, getAsHrefInherited, getAsLinkInherited, getAsLinkInherited, getAsLinkInherited, getAsListInherited, getAsPageInherited, getAsTypeInherited, getImageReferenceInherited, getImageReferenceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getImageSourceInherited, getInherited, getInherited |
| Methods inherited from interface io.sightly.java.api.Use |
init |
getComponent
<T extends Component> Optional<T> getComponent(String path,
Class<T> type)
- Get a component instance for the given path.
- Parameters:
path - absolute JCR path to the resource of the componenttype - component class type
- Returns:
- component instance or absent
Optional if path does not resolve to a resource
getComponent
<T extends Component> T getComponent(ComponentNode componentNode,
Class<T> type)
- Get a component instance for the given component node.
- Parameters:
componentNode - component node representing resource of desired componenttype - component class type
- Returns:
- component instance or null if an error occurs
getComponentRequest
ComponentRequest getComponentRequest()
- Get the component request.
- Returns:
- component request
getCurrentPage
PageDecorator getCurrentPage()
- Get the current page.
- Returns:
- current page
getService
<T> T getService(Class<T> serviceType)
- Get an OSGi service.
- Type Parameters:
T - type- Parameters:
serviceType - the type (class) of the service
- Returns:
- the service instance, or null if it is not available
getServices
<T> List<T> getServices(Class<T> serviceType,
String filter)
- Get one or more OSGi services.
- Type Parameters:
T - type- Parameters:
serviceType - the type (class) of the servicefilter - optional filter, see OSGi spec for syntax details
- Returns:
- one or more service instances, or null if none are found
Copyright © 2015 CITYTECH, Inc.. All rights reserved.