public class AbstractFollowing extends BaseSocialComponent implements MutableFollowing
1. The userId is obtained from the resource Following.PROP_USERID
property; If this property does not
exist, the userId is obtained from the request's session user id.
2. The followedId is obtained from the resource Following.PROP_FOLLOWEDID
property; If this property does
not exist, the userId is obtained from the resource name
PROP_FOLLOWEDID, PROP_USERID, RESOURCE_TYPE
CSV_SELECTOR, DEFAULT_SELECTOR, INDEX_SELECTOR, PROP_REFERER, QUERY_SELECTOR, TRANSLATE_SELECTOR
Constructor and Description |
---|
AbstractFollowing(Resource resource,
ClientUtilities clientUtils,
QueryRequestInfo q) |
Modifier and Type | Method and Description |
---|---|
Edge |
edge()
Get the relationship representing this instance
|
Vertex |
followedNode()
Get the followed user graph node
|
java.lang.String |
getFollowedId()
Get the followed Id.
|
java.lang.String |
getFollowedResourceType()
Get the followed Resource Type
|
boolean |
getIsFollowed()
Check the follow state
|
boolean |
getIsFollowedUser()
Check if the followed item is a user
|
boolean |
getMayFollow()
Indicate whether the current user can follow the specify following user.
|
User |
getUser()
Get the user
|
void |
setFollowingState(boolean newState)
Toggle the state of the following instance.
|
SocialGraph |
socialGraph()
Get socialGraph of this instance.
|
Vertex |
userNode()
Get the user social graph node
|
buildJSONString, getAsMap, getFriendlyUrl, getId, getParentComponent, getProperties, getProperty, getProperty, getResource, getResourceType, getSourceComponent, getUrl, toJSONString
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsMap, getFriendlyUrl, getId, getParentComponent, getProperties, getProperty, getProperty, getResource, getResourceType, getSourceComponent, getUrl, toJSONString
public AbstractFollowing(Resource resource, ClientUtilities clientUtils, QueryRequestInfo q)
public boolean getIsFollowed()
Following
getIsFollowed
in interface Following
public SocialGraph socialGraph()
Following
socialGraph
in interface Following
public Edge edge()
Following
public Vertex userNode()
Following
public Vertex followedNode()
Following
followedNode
in interface Following
public boolean getIsFollowedUser()
Following
getIsFollowedUser
in interface Following
public boolean getMayFollow()
Following
getMayFollow
in interface Following
public void setFollowingState(boolean newState)
MutableFollowing
setFollowingState
in interface MutableFollowing
newState
- the new state of followwingpublic java.lang.String getFollowedId()
Following
getFollowedId
in interface Following
public java.lang.String getFollowedResourceType()
Following
getFollowedResourceType
in interface Following
Copyright © 2010 - 2020 Adobe. All Rights Reserved