Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.webcenter.peopleconnections.connections
Interface ConnectionsManager


public interface ConnectionsManager

The access point for all operations related to retrieving and updating information about social connections between users.

An instance of this can be obtained via a call to ConnectionsServiceFactory.getConnectionsManager().

Since:
release specific (what release of product did this appear in)

Nested Class Summary
static class ConnectionsManager.SortCriteria
           

 

Method Summary
 void addConnectionListener(ConnectionListener listener)
          Registers all the ConnectionListeners to an arraylist of ConnectionListener
 Connection findConnection(java.lang.String owner, java.lang.String connectee)
          Deprecated. All known usages of this method so far are for determining a pair of users are connected or not; use isConnected(java.lang.String, java.lang.String) instead for that purpose.
 java.util.List<ConnectionListener> getAllConnectionListeners()
          Returns List of ConnectionListeners
 java.util.List<java.lang.Object[]> getAllConnections(int startIndex, int itemsPerPage)
          Returns all the connections in the system.
 java.util.List<Connection> getConnections(java.lang.String userGuid)
          Returns all the connections of the specified user.
 java.util.List<Connection> getConnections(java.lang.String userGuid, java.lang.String connectionListName, java.lang.String filterCriteria, ConnectionsManager.SortCriteria sortCriteria, int startIndex, int itemsPerPage)
          Returns the connections of the specified user based on specified additional parameters.
 java.util.List<java.lang.Object[]> getConnectionsWithPreferences(java.lang.String userGuid, java.lang.String applicationId, java.lang.String scope, java.lang.String serviceId, java.lang.String settingKey, java.lang.String configurableSettingKey)
          Returns the specified user's connections's, the specified user', and the system's setting value for the specified setting key and the system's setting that indicates whether the specified setting is configurable by end user
 int getNumberOfConnections(java.lang.String userGuid)
          Returns the number of connections of the specified user.
 int getNumberOfConnections(java.lang.String userGuid, java.lang.String connectionListName, java.lang.String filterCriteria)
          Returns the number of connections of the specified user based on specified additional parameters.
 boolean isConnected(java.lang.String userGuid1, java.lang.String userGuid2)
          Determines whether a specified pair of users share a connection.
 void removeConnection(java.lang.String userGuid)
          Removes the connection, if any, between the specified user and the current user.
 void removeConnectionListener(ConnectionListener listener)
          Removes ConnectionListener from the arraylist of ConnectionListener
 void teardown()
          Does cleanup for this service this is normally called from the app shutdown context listener.
 void updateConnectionListsMembership(java.lang.String memberGuid, java.util.Collection<java.lang.String> addListIds, java.util.Collection<java.lang.String> removeListIds)
          Updates the membership of a particular Connection to different ConnectionLists

 

Method Detail

addConnectionListener

void addConnectionListener(ConnectionListener listener)
                           throws ConnectionsException
Registers all the ConnectionListeners to an arraylist of ConnectionListener
Parameters:
object - of class that implements ConnectionListener
Throws:
ConnectionsException - If proper object of class implementing ConnectionListener is missing.

removeConnectionListener

void removeConnectionListener(ConnectionListener listener)
                              throws ConnectionsException
Removes ConnectionListener from the arraylist of ConnectionListener
Parameters:
object - of class that implements ConnectionListener
Throws:
ConnectionsException - If proper object of class implementing ConnectionListener is missing.

getAllConnectionListeners

java.util.List<ConnectionListener> getAllConnectionListeners()
                                                             throws ConnectionsException
Returns List of ConnectionListeners
Parameters:
void -
Returns:
List of ConnectionListener
Throws:
ConnectionsException - If proper object of class implementing ConnectionListener is missing.

updateConnectionListsMembership

void updateConnectionListsMembership(java.lang.String memberGuid,
                                     java.util.Collection<java.lang.String> addListIds,
                                     java.util.Collection<java.lang.String> removeListIds)
                                     throws ConnectionsException
Updates the membership of a particular Connection to different ConnectionLists
Parameters:
userGuid, - list of ConnectionLists to which user is supposed to be addd and list of ConnectionLists from which user is supposed to be removed.
Throws:
ConnectionsException - If invalid memberGuid or list of ConnectionList Ids either to be added or removed is passed.

getConnections

java.util.List<Connection> getConnections(java.lang.String userGuid)
                                          throws ConnectionsException
Returns all the connections of the specified user.
Parameters:
userGuid - GUID of the user for whom to return connections
Returns:
List of connections of the specified user, or an empty list if the current user is not allowed to view the connections of the specified user.
Throws:
ConnectionsException - If the user GUID is null or any error occurs retrieving connections.

getNumberOfConnections

int getNumberOfConnections(java.lang.String userGuid)
                           throws ConnectionsException
Returns the number of connections of the specified user.
Parameters:
userGuid - GUID of the user for whom to return the number of connections
Returns:
number of connections of the specified user.
Throws:
ConnectionsException - If the user GUID is null or any error occurs retrieving connections count.

getConnections

java.util.List<Connection> getConnections(java.lang.String userGuid,
                                          java.lang.String connectionListName,
                                          java.lang.String filterCriteria,
                                          ConnectionsManager.SortCriteria sortCriteria,
                                          int startIndex,
                                          int itemsPerPage)
                                          throws ConnectionsException
Returns the connections of the specified user based on specified additional parameters.
Parameters:
userGuid - GUID of the user for whom to return connections
connectionListName - (optional) Name of a connection list owned by the current user. If specified, the method will return only members of this connection list.
filterCriteria - (optional) Pattern with which to filter the list of connections being returned. If specified, the filtering will be done on certain selected attributes of the connections' profiles.
sortCriteria - (optional) Criteria in which to order the list of connections being returned. If not specified, the list will be ordered alphabetically the connectee user's display name.
startIndex - (optional) Zero-based index among the connections, from which the returned list should start. Specify a non-negative value to use this option.
itemsPerPage - (optional) Maximum number of elements to be returned from among the connections.
Returns:
List of connections of the specified user based on specified parameters, or an empty list if the current user is not allowed to view connections of the specified user.
Throws:
ConnectionsException - If the user GUID is null or any error occurs retrieving connections.

getNumberOfConnections

int getNumberOfConnections(java.lang.String userGuid,
                           java.lang.String connectionListName,
                           java.lang.String filterCriteria)
                           throws ConnectionsException
Returns the number of connections of the specified user based on specified additional parameters.
Parameters:
userGuid - GUID of the user for whom to return number of connections
connectionListName - (optional) Name of a connection list owned by the current user. If specified, the method will return only number of members of this connection list.
filterCriteria - (optional) Pattern with which to filter the number of connections being returned. If specified, the filtering will be done on certain selected attributes of the connections' profiles.
Returns:
number of connections for the specified parameters.
Throws:
ConnectionsException - If the user GUID is null or any error occurs retrieving connections count.

getConnectionsWithPreferences

java.util.List<java.lang.Object[]> getConnectionsWithPreferences(java.lang.String userGuid,
                                                                 java.lang.String applicationId,
                                                                 java.lang.String scope,
                                                                 java.lang.String serviceId,
                                                                 java.lang.String settingKey,
                                                                 java.lang.String configurableSettingKey)
                                                                 throws ConnectionsException
Returns the specified user's connections's, the specified user', and the system's setting value for the specified setting key and the system's setting that indicates whether the specified setting is configurable by end user
Parameters:
userGuid - GUID of the user for whom to return connections
applicationID - application ID used to lookup from the setting table
scope - scope used to lookup from the setting table
serviceId - service ID used to lookup from the setting table
settingKey - setting key to be looked up from the setting table
configurableSettingKey - system's setting key that indicates whether the specified seeting key can be configured by end user
Returns:
List of arrays of connection user guid, setting key, and setting value.
Throws:
ConnectionException - if the user guid is null or any error occurs retrieving Connections
ConnectionsException

getAllConnections

java.util.List<java.lang.Object[]> getAllConnections(int startIndex,
                                                     int itemsPerPage)
                                                     throws ConnectionsException
Returns all the connections in the system.
Parameters:
startIndex - the first connection to return
itemsPerPage - the number of connections to return
Returns:
List of connection object[]s. The first item is the connector (login id), the second item is the connectee (login id), and the third item is the connected date.
Throws:
ConnectionsException - If there are any error occurs retrieving connections.

isConnected

boolean isConnected(java.lang.String userGuid1,
                    java.lang.String userGuid2)
                    throws ConnectionsException
Determines whether a specified pair of users share a connection.
Parameters:
userGuid1 - GUID of a user in the system whose connections the current user is allowed to view (can be the current user)
userGuid2 - GUID of any user in the system
Returns:
true if there is a connection between the two specified users and the current user is allowed to view the connections of the user with GUID userGuid1, false otherwise
Throws:
ConnectionsException - If either of the specified GUIDs are null or any error occurs retrieving connection information.

removeConnection

void removeConnection(java.lang.String userGuid)
                      throws ConnectionsException
Removes the connection, if any, between the specified user and the current user.

If the call to this method goes through successfully, then the specified user and the current user will not be a connection with each other, and they will not appear in any of each other's connection lists.

Parameters:
userGuid - GUID of the user with which to severe the connection.
Throws:
ConnectionsException - If the user GUID specified is null or any other error occurs removing the connection.

teardown

void teardown()
Does cleanup for this service this is normally called from the app shutdown context listener.

findConnection

@Deprecated
Connection findConnection(java.lang.String owner,
                                     java.lang.String connectee)
                          throws ConnectionsException
Deprecated. All known usages of this method so far are for determining a pair of users are connected or not; use isConnected(java.lang.String, java.lang.String) instead for that purpose.
Throws:
ConnectionsException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.