|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bigllc.retsiq.simpleclient.RETSUserSession
public class RETSUserSession
A user session for an authenticated user. The session allows interaction
with the RETS Server such as searches, updates and object retrieval.
To create a RETSUserSession use the a RETSConnection class
to configure the server and authenticate a user.
RETSConnection connection = new RETSConnection("http://myretserver.com");
RETSUserSession session = connection.getSession("username", "password");
session.logout();
| Field Summary | |
|---|---|
static int |
NO_LIMIT
Magic number for notifying the server that the search limit should be overridden. |
static int |
VALIDATEFLAG_AUTOPOP
Magic number for sending an update to auto populate the record. |
static int |
VALIDATEFLAG_UPDATE
Magic number for sending an update that will be written to database if valid. |
static int |
VALIDATEFLAG_VALIDATE
Magic number for sending an update to validate but no write the record. |
| Method Summary | |
|---|---|
void |
action()
Action request. |
java.lang.String |
getAgentCode()
Get the agent code. |
java.lang.String |
getBrokerKey()
Get the broker key. |
java.lang.String |
getMemberName()
Get the member name. |
MetadataSystem |
getMetadata()
Fetch the complete Standard XML metadata and load it into the Metadata in memory model. |
MetadataSystem |
getMetadata(boolean everything)
Fetch XML metadata from the server. |
void |
getMetadata(java.io.OutputStream out)
Fetch the complete Standard XML metadata and write to the stream supplied. |
void |
getMetadata(java.io.OutputStream out,
boolean everything)
Fetch system metadata from the server. |
java.util.List<ObjectRecord> |
getObjects(java.lang.String objectPath,
java.io.File directory)
Fetch and save objects for records. |
java.util.List<ObjectRecord> |
getObjects(java.lang.String objectPath,
ObjectResponseHandler handler)
Fetch and save objects for records. |
ObjectRecord |
getObjectUrl(java.lang.String objectPathId)
Get the URL location for a single object such as a photo. |
java.util.List<ObjectRecord> |
getObjectUrls(java.lang.String objectPath)
Get the URL locations for multiple objects. |
int |
getRecordCount(java.lang.String path,
java.lang.String query)
Get the number of records that match a search query. |
java.lang.String |
getRetsVersion()
Get the RETS version being used to talk to the server. |
java.lang.String |
getSessionId()
Get the session id. |
java.lang.String |
getUserClassification()
Get the user classification. |
java.lang.String |
getUserId()
Get the user ID. |
int |
getUserLevel()
Get the user level. |
void |
logout()
Logout the session. |
void |
search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
int limit,
int offset,
boolean decoded,
SearchResponseHandler out)
Execute a search. |
void |
search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
int limit,
int offset,
SearchResponseHandler out)
Execute a search. |
void |
search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
SearchResponseHandler out)
Execute a search with the default server limit imposed. |
void |
setRequestRecordCount(boolean count)
Set whether the search request demand the record count value. |
boolean |
shouldRequestRecordCount()
Should the search request include the record count value. |
UpdateResponse |
update(java.lang.String updatePath,
java.util.Map<java.lang.String,java.lang.String> record,
int validate)
Update a record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int NO_LIMIT
public static final int VALIDATEFLAG_UPDATE
public static final int VALIDATEFLAG_AUTOPOP
public static final int VALIDATEFLAG_VALIDATE
| Method Detail |
|---|
public boolean shouldRequestRecordCount()
public void setRequestRecordCount(boolean count)
public java.lang.String getBrokerKey()
public java.lang.String getSessionId()
public java.lang.String getMemberName()
public java.lang.String getAgentCode()
public java.lang.String getUserClassification()
public java.lang.String getUserId()
public int getUserLevel()
public java.lang.String getRetsVersion()
public void action()
throws RETSClientException
RETSClientException
public void search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
SearchResponseHandler out)
throws RETSClientException
path - the resource and classification to query in the following
format - /<Resource>/<Classification>.query - the DMQL2 query to execute.fields - the fields to return, an empty list or null will
fetch all the fields.out - the handler to process the response.
RETSClientExceptionSearchResponseHandler,
DelimitedSearchResponseHandler,
RecordCollectionResponseHandler
public void search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
int limit,
int offset,
SearchResponseHandler out)
throws RETSClientException
path - the resource and classification to query in the following
format - /<Resource>/<Classification>.query - the DMQL2 query to execute.fields - the fields to return, an empty list or null will
fetch all the fields.limit - the number of records to limit the response to.
The number 0 specifies the server limit if one
existsoffset - the offset of the record the server should return.
The first record is 0. Note that some servers may not
honour this request.out - the handler to process the response.
RETSClientExceptionSearchResponseHandler,
DelimitedSearchResponseHandler,
RecordCollectionResponseHandler
public void search(java.lang.String path,
java.lang.String query,
java.util.List<java.lang.String> fields,
int limit,
int offset,
boolean decoded,
SearchResponseHandler out)
throws RETSClientException
path - the resource and classification to query in the following
format - /<Resource>/<Classification>.query - the DMQL2 query to execute.fields - the fields to return, an empty list or null will
fetch all the fields.limit - the number of records to limit the response to.
The number 0 specifies the server limit if one
existsoffset - the offset of the record the server should return.
The first record is 0. Note that some servers may not
honour this request.decoded - if true lookup values are decoded otherwise raw values
are returned.out - the handler to process the response.
RETSClientExceptionSearchResponseHandler,
DelimitedSearchResponseHandler,
RecordCollectionResponseHandler
public int getRecordCount(java.lang.String path,
java.lang.String query)
throws RETSClientException
path - the resource and classification to query in the following
format - /<Resource>/<Classification>.query - the DMQL2 query to execute.
RETSClientException
public ObjectRecord getObjectUrl(java.lang.String objectPathId)
throws RETSClientException
objectPathId - the object to fetch the URL for in the following
format: RETSClientException
public java.util.List<ObjectRecord> getObjectUrls(java.lang.String objectPath)
throws RETSClientException
objectPath - the object to fetch the URL for in the following
format:RETSClientException
public java.util.List<ObjectRecord> getObjects(java.lang.String objectPath,
java.io.File directory)
throws RETSClientException
objectPath - the object to fetch the URL for in the following
format:directory - the directory to save the returned objects to.
RETSClientException
public java.util.List<ObjectRecord> getObjects(java.lang.String objectPath,
ObjectResponseHandler handler)
throws RETSClientException
objectPath - the object to fetch the URL for in the following
format:handler - the handler responsible for persistence.
RETSClientException
public UpdateResponse update(java.lang.String updatePath,
java.util.Map<java.lang.String,java.lang.String> record,
int validate)
throws RETSClientException
updatePath - the type of update to perform. The format is
/<Resource>/<Classification>/<UpdateType> record - a column value map of fields representing the record to be
added ot edited.validate - false to try and execute the update, true to simply perfrom
validation
RETSClientException
public void getMetadata(java.io.OutputStream out,
boolean everything)
throws RETSClientException
out - the output stream to write the metadata too.everthing - if true, fetch the entire metadata. If false, fetch only
the METADATA-SYSTEM level
RETSClientException
public void getMetadata(java.io.OutputStream out)
throws RETSClientException
out - the output stream to write the metadata too.
RETSClientException
public MetadataSystem getMetadata(boolean everything)
throws RETSClientException
everything - if false, only fetch the METADATA-SYSTEM
level of metadata. If true, fetch METADATA-SYSTEM and all contained
metadata (ie, everything).
RETSClientException
public MetadataSystem getMetadata()
throws RETSClientException
getMetadata(true)
RETSClientException
public void logout()
throws RETSClientException
RETSClientException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||