public class BaseSocialComponent extends Object implements SocialComponent
DEFAULT_SELECTOR, INDEX_SELECTOR, PROP_REFERER, QUERY_SELECTOR, TRANSLATE_SELECTOR| Constructor and Description |
|---|
BaseSocialComponent(Resource resource,
ClientUtilities clientUtils) |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildJSONString(Map<String,Object> data,
boolean tidy) |
Map<String,Object> |
getAsMap() |
String |
getFriendlyUrl()
Get a url that can be used to display this component, most of the time, this is the page url that contains the
component.
|
ResourceID |
getId() |
SocialComponent |
getParentComponent()
Gets the immediate parent of this component.
|
Properties |
getProperties() |
Resource |
getResource() |
String |
getResourceType() |
SocialComponent |
getSourceComponent()
Gets the SocialComponent that created this piece of UGC.
|
String |
getUrl() |
String |
toJSONString(boolean tidy) |
public BaseSocialComponent(Resource resource, ClientUtilities clientUtils)
resource - the resource for which this BaseSocialComponent will be created for.clientUtils - an instance of ClientUtilities for accessing helper methods for XSS support and generating
URLs.public static String buildJSONString(Map<String,Object> data, boolean tidy) throws JsonException
JsonExceptionpublic ResourceID getId()
getId in interface SocialComponentpublic String getResourceType()
getResourceType in interface SocialComponentpublic String getUrl()
getUrl in interface SocialComponentpublic Properties getProperties()
getProperties in interface SocialComponentpublic String toJSONString(boolean tidy) throws JsonException
toJSONString in interface SocialComponenttidy - true to return readable JSON string.JsonException - if an error occurs during serialization.public Resource getResource()
getResource in interface SocialComponentpublic Map<String,Object> getAsMap()
getAsMap in interface SocialComponentpublic SocialComponent getParentComponent()
SocialComponentgetParentComponent in interface SocialComponentpublic SocialComponent getSourceComponent()
SocialComponentgetSourceComponent in interface SocialComponentpublic String getFriendlyUrl()
SocialComponentgetFriendlyUrl in interface SocialComponent"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"