public class Ratings extends AbstractComponent
| Modifier and Type | Field and Description |
|---|---|
static String |
GENERATED_RATINGS_PREFIX_PATH |
static String |
PROP_COMMENTS_ALLOWED |
static String |
PROP_DATE_FORMAT |
static String |
PROP_DEFAULT_MESSAGE |
static String |
PROP_MODERATE_COMMENTS |
static String |
PROP_SIGNED_IN_TEXT |
static String |
RATING_ELEMENT_RESOURCE_TYPE |
static String |
RESOURCE_TYPE |
changeProperties, client, componentPath, DEFAULT_LOCATION, jsonNode, location, pagePath| Constructor and Description |
|---|
Ratings(ComponentClient client,
String pagePath,
String location,
String nameHint)
The constructor stores all the component path information like
parentPage, name etc.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<Rating> |
getGeneratedRatings() |
String |
getGeneratedRatingsPath() |
String |
getResourceType()
The resource type for the component, e.g.
|
org.apache.sling.testing.clients.SlingHttpResponse |
postRating(String description,
String userIdentifier,
String email,
String url,
int rating) |
create, getClient, getComponentNode, getComponentPath, getCreateFormEntity, getFirstChild, getLocation, getName, getNext, getNextNodePath, getPagePath, getParentPath, getPrevious, getPreviousNodePath, getProperty, getPropertyAsString, getPropertyAsStringArray, reorder, save, setProperty, setPropertypublic static final String RESOURCE_TYPE
public static final String RATING_ELEMENT_RESOURCE_TYPE
public static String GENERATED_RATINGS_PREFIX_PATH
public static final String PROP_COMMENTS_ALLOWED
public static final String PROP_DATE_FORMAT
public static final String PROP_DEFAULT_MESSAGE
public static final String PROP_MODERATE_COMMENTS
public static final String PROP_SIGNED_IN_TEXT
public Ratings(ComponentClient client, String pagePath, String location, String nameHint)
client - The FoundationClient that's creating this instance.pagePath - path to the page that will contain the component.location - relative location to the parent node inside the page that will
contain the component node.nameHint - name to be used for the component node. Might get altered by
the server if a naming conflict occurs. The AbstractComponent.getName()
method will return the correct name after
(String,int...) has been called.public org.apache.sling.testing.clients.SlingHttpResponse postRating(String description, String userIdentifier, String email, String url, int rating) throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientExceptionpublic String getGeneratedRatingsPath()
public ArrayList<Rating> getGeneratedRatings() throws org.apache.sling.testing.clients.ClientException
org.apache.sling.testing.clients.ClientExceptionpublic String getResourceType()
AbstractComponentsling:resourceType property of the node.getResourceType in class AbstractComponentCopyright © 2018. All rights reserved.