public class BaseSocialComponent extends Object implements SocialComponent
DEFAULT_SELECTOR, INDEX_SELECTOR, 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
JsonException
public ResourceID getId()
getId
in interface SocialComponent
public String getResourceType()
getResourceType
in interface SocialComponent
public String getUrl()
getUrl
in interface SocialComponent
public Properties getProperties()
getProperties
in interface SocialComponent
public String toJSONString(boolean tidy) throws JsonException
toJSONString
in interface SocialComponent
tidy
- true to return readable JSON string.JsonException
- if an error occurs during serialization.public Resource getResource()
getResource
in interface SocialComponent
public Map<String,Object> getAsMap()
getAsMap
in interface SocialComponent
public SocialComponent getParentComponent()
SocialComponent
getParentComponent
in interface SocialComponent
public SocialComponent getSourceComponent()
SocialComponent
getSourceComponent
in interface SocialComponent
public String getFriendlyUrl()
SocialComponent
getFriendlyUrl
in interface SocialComponent
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"