|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.restconsumerframework.pathways.PathwaysRestAPIService
public class PathwaysRestAPIService
Provides methods to simplify and abstract making Pathways specific Rest API requests. Consumes either a RestXMLParser or RestJSONParser.
Field Summary | |
---|---|
protected int |
m_totalCount
|
Constructor Summary | |
---|---|
protected |
PathwaysRestAPIService(AActivitySpace space)
|
Method Summary | |
---|---|
protected void |
AddPathwaysAuthenticationToken(RestRequest request)
Set authentication |
void |
AddRemoveTagRest(java.lang.String tname,
java.lang.String fullId,
int action,
java.lang.String ptsource)
This Method is used to Add/Remove a Pathways Tag on a particular document. |
PathwaysSearchRestData[] |
DoSearch(PathwaysQueryArguments pathwaysQueryArgs)
Returns a Tag Cloud from a Pathways search query. |
static IPathwaysRestAPIService |
GetInstance(AActivitySpace space)
|
java.lang.String |
GetPathwaysAPIBaseURL(IPTSession session)
Gets the Pathways API base URL from the Pathways API Web Service object |
java.lang.String |
GetPathwaysAPIGatewayedURL(AActivitySpace space,
IPTSession session)
Gets the Pathways API Gatewayed URL from the Pathways API Web Service object This is used when making Pathways API calls on the client side via JSON. |
protected PathwaysSearchRestData[] |
GetSearchResultsData(IRestResponse response)
|
PathwaysTagRestData[] |
GetTagCloud(java.lang.String view,
java.lang.String format,
java.lang.String query,
java.lang.String resultCount)
Returns a Tag Cloud from a Pathways search query. |
protected PathwaysTagRestData[] |
GetTagListData(IRestResponse response)
|
int |
GetTotalCount()
Returns the total count of search results returned |
protected int |
GetTotalCountSearchResults(IRestResponse response)
|
PathwaysViewsRestData[] |
GetViews()
Queries the Pathways API service and returns an array of Pathways Views. |
protected PathwaysViewsRestData[] |
GetViewsData(IRestResponse response)
|
boolean |
IsAdaptiveLayoutMode()
Returns if the current user experience supports adaptive layout mode |
boolean |
IsPathwaysEnabled()
Checks if Pathways service is enabled from the config settings. |
void |
RenameTagRest(java.lang.String tname,
java.lang.String fullId,
java.lang.String ptsource,
java.lang.String renametag)
This Method is used to Rename a Pathways Tag on a particular document. |
static void |
setTestInstance(IPathwaysRestAPIService testHelper)
Unit tests should use this method to overwrite/teardown existing helper singleton. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int m_totalCount
Constructor Detail |
---|
protected PathwaysRestAPIService(AActivitySpace space)
Method Detail |
---|
public static IPathwaysRestAPIService GetInstance(AActivitySpace space)
public static void setTestInstance(IPathwaysRestAPIService testHelper)
public boolean IsPathwaysEnabled()
IsPathwaysEnabled
in interface IPathwaysRestAPIService
public java.lang.String GetPathwaysAPIBaseURL(IPTSession session)
GetPathwaysAPIBaseURL
in interface IPathwaysRestAPIService
session
- the current user session.
public java.lang.String GetPathwaysAPIGatewayedURL(AActivitySpace space, IPTSession session)
GetPathwaysAPIGatewayedURL
in interface IPathwaysRestAPIService
session
- the current user session.
public PathwaysViewsRestData[] GetViews()
GetViews
in interface IPathwaysRestAPIService
public PathwaysTagRestData[] GetTagCloud(java.lang.String view, java.lang.String format, java.lang.String query, java.lang.String resultCount)
GetTagCloud
in interface IPathwaysRestAPIService
view
- the Pathways view to use when retrieving the Tag Cloudformat
- the payload format of the responsequery
- the Pathways search querytagCount
- the maximum number of tags to return for the Tag Cloud
public PathwaysSearchRestData[] DoSearch(PathwaysQueryArguments pathwaysQueryArgs)
DoSearch
in interface IPathwaysRestAPIService
view
- the Pathways view to use when retrieving the Tag Cloudformat
- the payload format of the responsequery
- the Pathways search querytagCount
- the maximum number of tags to return for the Tag CloudobjectTypes
- is the object types to limit the search
public void AddRemoveTagRest(java.lang.String tname, java.lang.String fullId, int action, java.lang.String ptsource)
AddRemoveTagRest
in interface IPathwaysRestAPIService
tname
- Name of the Tag on Which to take actionfullId
- Complete ID (CLASSID_DOCUMENTID) of the Document the tag is related toaction
- Operation to perform on the tag, 0 = Add, 1 = Delete, 2 = Edit (delete old tag and add new tag)ptsource
- Source of the Object, for Portal it is 'PTPORTAL' and collab it is 'PTCOLLAB'. More sources are in PathwaysConstants.public void RenameTagRest(java.lang.String tname, java.lang.String fullId, java.lang.String ptsource, java.lang.String renametag)
RenameTagRest
in interface IPathwaysRestAPIService
tname
- the Source Tag Name to be used for renamingfullId
- Complete ID (CLASSID_DOCUMENTID) of the Document the tag is related toptsource
- Source of the Object, for Portal it is 'PTPORTAL' and collab it is 'PTCOLLAB'. More sources are in PathwaysConstants.renametag
- the Target Tag Name to be used for renamingprotected void AddPathwaysAuthenticationToken(RestRequest request)
request
- protected PathwaysTagRestData[] GetTagListData(IRestResponse response)
protected PathwaysSearchRestData[] GetSearchResultsData(IRestResponse response)
response
-
protected int GetTotalCountSearchResults(IRestResponse response)
public int GetTotalCount()
IPathwaysRestAPIService
GetTotalCount
in interface IPathwaysRestAPIService
protected PathwaysViewsRestData[] GetViewsData(IRestResponse response)
public boolean IsAdaptiveLayoutMode()
IPathwaysRestAPIService
IsAdaptiveLayoutMode
in interface IPathwaysRestAPIService
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |