Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

com.lotus.cs
Class QPService

java.lang.Object
  extended bycom.lotus.cs.QPService
All Implemented Interfaces:
CSBaseService

public class QPService
extends java.lang.Object
implements CSBaseService

An instance of class QPService creates 1-n instances of quickplaces on a specific server.
Note: Ensure the following is true for proper operation of the QPService methods.
1. QuickPlace server: "Run restricted Java/Javascript/COM" must be set to valid users
2. QuickPlace server: "Run unrestricted Java/Javascript/COM" must be set to valid users
3. QuickPlace server: cs.jar must be installed
4. WebSphere Portal Server: CSEnvironment.properties LDAP server must be correct
5. SSO or Basic Authentication must be operating properly.


Field Summary
static int CSQP_Authors
           
static int CSQP_Managers
           
static int CSQP_Readers
           
 

Method Summary
 boolean addGroup(java.lang.String PlaceName, java.lang.String RoomName, java.lang.String dnMemberName, int Role)
          Adds a group and assigns access rights to a room of a QuickPlace.
 boolean addMember(java.lang.String PlaceName, java.lang.String RoomName, java.lang.String dnMemberName, int Role)
          Adds a member and assigns access rights to a room of a QuickPlace.
 void cleanup()
          Always call the cleanup() method when finished with the Service object.
 java.lang.String java.util.Hashtable)">create(java.util.Hashtable ht)
          Creates a QuickPlace on the remote server and returns the URL that references it.
 java.lang.String java.util.HashMap)">createPlace(java.lang.String PlaceName, java.lang.String PlaceType, java.lang.String PlaceTitle, java.util.HashMap mData)
          Creates a QuickPlace on the remote server and returns the URL that references it.
 java.util.HashMap[] getMemberAccess(java.lang.String PlaceName, java.lang.String RoomDatabaseName)
          Returns the distinguished names and access rights of all members and groups to a room of a QuickPlace.
 java.lang.String[] getPlaces()
          Retrieves a list of placetypes that are available on this server with their descriptions..
 java.util.HashMap getPlacesForMember(java.lang.String Dn)
          Return a list of places the authenticated user is a member of on all QuickPlace servers in the QuickPlace service.
 java.util.HashMap getPlaceTypes()
          Retrieves a HashMap of placetypes that are available on this server, with their descriptions.
 java.util.HashMap getRoomStructure(java.lang.String placeName, java.lang.String roomFileName)
          Returns the room hierachy of a QuickPlace and the table of contents for each room.
 void init(CSCredentials cred, java.lang.String server, java.lang.String protocol)
          Do not call the init() method.
 boolean lockPlace(java.lang.String PlaceName, java.lang.String Message)
          Locks the specified QuickPlace.
 boolean removeGroup(java.lang.String PlaceName, java.lang.String RoomName, java.lang.String dnMemberName, boolean force)
          Removes a group from a room of a QuickPlace.
 boolean removeMember(java.lang.String PlaceName, java.lang.String RoomName, java.lang.String dnMemberName, boolean force)
          Removes a member from a room of a QuickPlace.
 boolean removePlace(java.lang.String PlaceName, boolean force)
          Removes the entire QuickPlace from the server.
 java.util.Vector search(java.lang.String Search, int start, int count, java.lang.String order)
          Performs a "full-text" search across all QuickPlaces in the QuickPlace service.
 boolean unlockPlace(java.lang.String PlaceName)
          Unlocks the specified QuickPlace.
 boolean java.util.HashMap)">updateMetaData(java.lang.String PlaceName, java.lang.String title, java.util.HashMap mData)
          Updates the QuickPlace title and the meta data associated with the place, passed in as name value pairs.
 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSQP_Managers

public static final int CSQP_Managers
See Also:
Constant Field Values

CSQP_Authors

public static final int CSQP_Authors
See Also:
Constant Field Values

CSQP_Readers

public static final int CSQP_Readers
See Also:
Constant Field Values

Method Detail

init

public void init(CSCredentials cred,
                 java.lang.String server,
                 java.lang.String protocol)
Do not call the init() method. init is called internally by CSFactory as part of the getService.

Specified by:
init in interface CSBaseService
See Also:
CSBaseService.init(com.lotus.cs.CSCredentials, java.lang.String, java.lang.String)

cleanup

public void cleanup()
Always call the cleanup() method when finished with the Service object.

Specified by:
cleanup in interface CSBaseService
See Also:
CSBaseService.cleanup()

getRoomStructure

public java.util.HashMap getRoomStructure(java.lang.String placeName,
                                          java.lang.String roomFileName)
Returns the room hierachy of a QuickPlace and the table of contents for each room.

Parameters:
roomFileName - String name of the room. If null, main.nsf will be used.
Returns:
HashMap of all rooms in the place. The value of each element is a vector representing the table of contents.

getPlacesForMember

public java.util.HashMap getPlacesForMember(java.lang.String Dn)
Return a list of places the authenticated user is a member of on all QuickPlace servers in the QuickPlace service. This method works with QuickPlace 3.0 only.

Parameters:
Dn - String representing the full distingueshed name (eg .. "cn=Bonnie Blair,ou=Gold,o=USA") for the logged in user. If null, then the name will be extracted from the passed in credentials. Normally this value is null.
Returns:
HashMap if null, then an error occurred connecting to the server, otherwise Key=NameOfQuickplace, Value=HashMap of properties for the place or if Null then an error occured connecting to server.
Place properties include:name,last_modified, port, hostname, title, last_accessed, protocol, url_prefix=, size
Where all dates are represented in ISO 8601 format in the form: YYYYMMDDTHHMMSS,FFTZN
YYYY=4 digit year
MM=Month
DD=Day
THHMMSS,FF=Time hours,minutes,Seconds,Fractions of second
TZN=TIme zone, +/- hours off UTC (Example:EST= -5, EDT= -4)

search

public java.util.Vector search(java.lang.String Search,
                               int start,
                               int count,
                               java.lang.String order)
Performs a "full-text" search across all QuickPlaces in the QuickPlace service.

Parameters:
Search - Properly formatted full-text query string. NOTE: Use 'and' instead of '&'. It is recommended that the search string is UTF-8 encoded. Particularly, for languages with Double Byte Character Sets.
start - Specifies the starting position of the search results to be returned. A starting position of zero specifies that results starting with the first match should be returned.
count - Specifies the maximum number of search match hits to be returned. A value of -1 specifies that all hits should be returned.
order - String that specifies the search return sort order. If null, score is used
score - Return results sorted by relevance
asc- Return results sorted with oldest occurrences first
desc- Return results sorted with newest occurrences first
Returns:
Vector -- Vector of HashMaps in order of the search. Some of the Name/Value pairs are listed below, and ONLY Name/Value pairs that have information will be returned (eg. if there is no abstract info).
placename -- Place name
last_modified-- ISO Date (eg (20020812T140737,57-04)
authordn -- dn of author of document (eg CN=Jane Doe,OU=Sales,O=ACME)
authorname -- Display name of author of document (eg Jane Doe)
url -- url of place where text was found
abstract -- abstract of document
title--Document title
relevance--how closely it matched the query

java.util.HashMap)">

createPlace

public java.lang.String createPlace(java.lang.String PlaceName,
                                    java.lang.String PlaceType,
                                    java.lang.String PlaceTitle,
                                    java.util.HashMap mData)
Creates a QuickPlace on the remote server and returns the URL that references it. The initial QuickPlace manager will be the authenticated user.

Parameters:
PlaceTitle - String used for the title of the quickplace. If null, then PlaceName will be used.
mData - Hashmap with Name/value pairs for meta data.
Returns:
String url to the new QuickPlace

getPlaces

public java.lang.String[] getPlaces()
Retrieves a list of placetypes that are available on this server with their descriptions..

Returns:
String [] List of strings of all the quickplace names on the server

getPlaceTypes

public java.util.HashMap getPlaceTypes()
Retrieves a HashMap of placetypes that are available on this server, with their descriptions.

Returns:
HashMap Place types as the key, and the description as the value

getMemberAccess

public java.util.HashMap[] getMemberAccess(java.lang.String PlaceName,
                                           java.lang.String RoomDatabaseName)
Returns the distinguished names and access rights of all members and groups to a room of a QuickPlace.

Parameters:
RoomDatabaseName - - Database name of room. If NULL the main room (main.nsf) is assumed.
Returns:
HashMap array with 2 elements. HashMap[0] contains all the groups. HashMap[1] contains the person. Each key in the HashMap is the name of the person or group.
The value is a character string that represents the access level:
"A" Authors
"M" Managers
"R" Readers

addMember

public boolean addMember(java.lang.String PlaceName,
                         java.lang.String RoomName,
                         java.lang.String dnMemberName,
                         int Role)
Adds a member and assigns access rights to a room of a QuickPlace.

Parameters:
RoomName - Database name of room. If null, the main room is assumed (main.nsf).
dnMemberName - dn of new member.
Role - One of CSQP_Authors, CSQP_Managers ,CSQP_Readers
Returns:
boolean true if successful false if not

addGroup

public boolean addGroup(java.lang.String PlaceName,
                        java.lang.String RoomName,
                        java.lang.String dnMemberName,
                        int Role)
Adds a group and assigns access rights to a room of a QuickPlace.

Parameters:
RoomName - Database name of room. If null, the main room is assumed (main.nsf).
dnMemberName - dn of new group.
Role - One of CSQP_Authors, CSQP_Managers ,CSQP_Readers
Returns:
boolean true if successful false if not

removeMember

public boolean removeMember(java.lang.String PlaceName,
                            java.lang.String RoomName,
                            java.lang.String dnMemberName,
                            boolean force)
Removes a member from a room of a QuickPlace.

Parameters:
RoomName - Database name of room. If null, the main room is assumed (main.nsf) and user will be removed from entire Place.
dnMemberName - dn of Member.
force - if true, the Member will be removed from the entire quick Place, inlcuding the members person record.
Returns:
boolean true if successful false if not
See Also:
addPerson

removeGroup

public boolean removeGroup(java.lang.String PlaceName,
                           java.lang.String RoomName,
                           java.lang.String dnMemberName,
                           boolean force)
Removes a group from a room of a QuickPlace.

Parameters:
RoomName - Database name of room. If null, the main room is assumed (main.nsf) and user will be removed from entire Place.
dnMemberName - dn of Group.
force - if true, the Group will be removed from the entire quick Place, inlcuding the Groups person record.
Returns:
boolean true if successful false if not

java.util.HashMap)">

updateMetaData

public boolean updateMetaData(java.lang.String PlaceName,
                              java.lang.String title,
                              java.util.HashMap mData)
Updates the QuickPlace title and the meta data associated with the place, passed in as name value pairs. Meta data is stored in the placecatalog under the QuickPlace name.

Parameters:
title - String name of new title for QUickplace. If Null, title is left unchanged.
mData - Hashmap with Name/value pairs for meta data.If null, meta data is left unchanged.
Returns:
none

removePlace

public boolean removePlace(java.lang.String PlaceName,
                           boolean force)
Removes the entire QuickPlace from the server.

Parameters:
force - if true, quickplace will be deleted immediately, if false it will be marked for deletion
Returns:
boolean true if successful false if not

lockPlace

public boolean lockPlace(java.lang.String PlaceName,
                         java.lang.String Message)
Locks the specified QuickPlace. Access to the QuickPlace is prohibited until the QuickPlace is unlocked.

Parameters:
Message - A string representing message that you want displayed when access to the specified place is attempted.
Returns:
boolean true is successful and false if not

unlockPlace

public boolean unlockPlace(java.lang.String PlaceName)
Unlocks the specified QuickPlace. Access to the QuickPlace is allowed after the QuickPlace is unlocked.

Returns:
boolean true is successful and false if not

java.util.Hashtable)">

create

public java.lang.String create(java.util.Hashtable ht)
Creates a QuickPlace on the remote server and returns the URL that references it. This method uses just one parameter, a Hashtable, which holds parameter names and values. Only this parameter is required: QPName. You may add the following parameters to the Hashtable before each call. Add the attributes via the put and get methods. Example: qpObject.put("GroupManagerName","My Manager Name Group");
  • QPName (required) String name of QuickPlace. Must be a legal QuickPlace name.
  • QPTemplate (optional) String name of the QuickPlace template that should be used to create the QuickPlace
  • QPDir (optional) String directory to create the QuickPlace. Must be a legal file directory name. If null, then QPName is used to make a valid directory name.
  • GroupManagerName (optional) String name of LDAP group that the QuickPlace will use for Manager access
  • GroupAuthorName (optional) String name of LDAP group that the QuickPlace will use for Author access
  • GroupMemberName (optional) String name of LDAP group that the QuickPlace will use for Member access
  • This method works with QuickPlace 2.0.8 and QuickPlace 3.0.

Parameters:
ht - Hashtable with parameters listed above
Returns:
String url to the new QuickPlace

Overview  Package   Class  Tree  Serialized  Deprecated  Index  Help 

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.