Jive API (3.0.13) Core Javadocs

com.jivesoftware.community.user.relationships
Class UserRelationshipView

java.lang.Object
  extended by com.jivesoftware.community.user.relationships.UserRelationshipView

public class UserRelationshipView
extends Object

Represents the relative view of a relationship as opposed to UserRelationship which represents the data-store view.


Nested Class Summary
static class UserRelationshipView.ViewType
          Represents the different types of relationships between users.
 
Field Summary
protected  Date dateCreated
           
protected  Date dateRetired
           
protected  long id
           
protected  String label
           
protected  User person
           
protected  UserRelationship.RelationshipState state
           
protected  User user
           
protected  UserRelationshipView.ViewType viewType
           
 
Constructor Summary
UserRelationshipView(long relationshipID, User person)
          A constructor for "friend" relationships.
UserRelationshipView(UserRelationship rel, User user, User person, UserRelationshipGraph graph)
          This is a simple, non-relative constructor where we don't have any relative directionality for the manager/direct report relationship (x is always y's manager, and label is not relative to requester, whether they're x or y).
UserRelationshipView(UserRelationshipView.ViewType viewType, long relationshipID, User user, User person, String label)
           
UserRelationshipView(UserRelationshipView view)
          Construct one view from another.
UserRelationshipView(User requester, UserRelationship rel, User user, User person, UserRelationshipGraph graph)
          This constructor is relative to who is requesting the view (for the directional manager/direct report relationship).
 
Method Summary
static Collection<User> asUsers(User targetUser, Collection<UserRelationshipView> views)
          A convenience method for extracting Users from UserRelationshipViews.
 Date getDateCreated()
           
 Date getDateRetired()
           
 long getID()
           
 String getLabel()
           
 User getPerson()
           
 UserRelationship.RelationshipState getState()
           
 UserRelationshipView.ViewType getType()
           
 User getUser()
           
 boolean isApproved()
           
 boolean isDirectReport()
           
 boolean isManager()
           
 boolean isPeer()
           
 boolean isPendingApproval()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

viewType

protected UserRelationshipView.ViewType viewType

id

protected long id

user

protected User user

person

protected User person

label

protected String label

dateCreated

protected Date dateCreated

dateRetired

protected Date dateRetired

state

protected UserRelationship.RelationshipState state
Constructor Detail

UserRelationshipView

public UserRelationshipView(UserRelationship rel,
                            User user,
                            User person,
                            UserRelationshipGraph graph)
This is a simple, non-relative constructor where we don't have any relative directionality for the manager/direct report relationship (x is always y's manager, and label is not relative to requester, whether they're x or y).

Parameters:
rel -
user -
person -
graph -

UserRelationshipView

public UserRelationshipView(User requester,
                            UserRelationship rel,
                            User user,
                            User person,
                            UserRelationshipGraph graph)
This constructor is relative to who is requesting the view (for the directional manager/direct report relationship).

Parameters:
requester -
rel -
user -
person -
graph -

UserRelationshipView

public UserRelationshipView(UserRelationshipView.ViewType viewType,
                            long relationshipID,
                            User user,
                            User person,
                            String label)

UserRelationshipView

public UserRelationshipView(long relationshipID,
                            User person)
A constructor for "friend" relationships.

Parameters:
relationshipID -
person -

UserRelationshipView

public UserRelationshipView(UserRelationshipView view)
Construct one view from another.

Parameters:
view -
Method Detail

getID

public long getID()

getUser

public User getUser()

getPerson

public User getPerson()

getLabel

public String getLabel()

getType

public UserRelationshipView.ViewType getType()

getState

public UserRelationship.RelationshipState getState()

isManager

public boolean isManager()

isPeer

public boolean isPeer()

isDirectReport

public boolean isDirectReport()

isApproved

public boolean isApproved()

isPendingApproval

public boolean isPendingApproval()

toString

public String toString()
Overrides:
toString in class Object

getDateCreated

public Date getDateCreated()

getDateRetired

public Date getDateRetired()

asUsers

public static Collection<User> asUsers(User targetUser,
                                       Collection<UserRelationshipView> views)
A convenience method for extracting Users from UserRelationshipViews.

Parameters:
targetUser -
views -
Returns:

Jive Product Page

Copyright © 1999-2007 Jive Software.