com.supermap.services.iportalservices
Class IPortalService
- java.lang.Object
-
- com.supermap.services.iportalservices.IPortalService
-
public class IPortalService extends java.lang.Object
Docking iPortal service class such as: http://host:port/iportal/web Portal resource is the root node of each REST service provided by SuperMap iPortal and the entrance to access each portal.
-
-
Constructor Summary
Constructors Constructor and Description IPortalService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addOnResponseListener(OnResponseListener listener)
Adds the listener of Internet requestingvoid
applyToGroup(java.lang.String groupId, java.lang.String applyReason, java.lang.String applicant, OnResponseListener onResponseListener)
User applies for adding a group If join a group does not need to verify, user can join it directly.void
cancelDownload(Call downloadCall)
Cancels the currently downloading taskvoid
cancelUpload(Call mUploadCall)
Cancels the currently uploading taskvoid
checkGroupApply(java.lang.String groupId, java.util.List<java.lang.String> userIds, boolean isAccepted, OnResponseListener onResponseListener)
Checks all applications of the current group in bulk.void
createGroup(java.lang.String groupName, java.lang.String tags, boolean isPublic, java.lang.String description, GroupRole groupRole, boolean isNeedCheck, OnResponseListener onResponseListener)
Create a groupvoid
deleteGroup(java.util.List<java.lang.String> groupsIds, OnResponseListener onResponseListener)
Deletes groups in bulkvoid
deleteMyContentItem(MyContentType type, int ID, OnResponseListener onResponseListener)
Deletes my resourcevoid
downloadData(int dataID, DownloadListener downloadListener)
Downloads from Data Centervoid
downloadMyData(int dataID, DownloadListener downloadListener)
Downloads my datavoid
getDatas(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
Data resource (GET)void
getGroupApply(java.lang.String groupId, int currentPage, int pageSize, GroupCheckStatus groupCheckStatus, OrderType orderType, OnResponseListener onResponseListener)
Gets the application list information of the current group Including application information, passed application information, and privileged audit.void
getGroupInfo(java.lang.String groupId, OnResponseListener onResponseListener)
Checks resource information of a groupvoid
getGroupResources(java.lang.String groupId, int currentPage, int pageSize, java.lang.String keywords, ResourceOrderBy resourceOrderBy, OrderType orderType, java.lang.String resourceCreator, OnResponseListener onResponseListener)
Check data resource of a group Once members of a group get data ID, they can download data directlyvoid
getGroupsInfo(int currentPage, int pageSize, GroupOrderBy groupOrderBy, java.lang.String keywords, JoinTypes joinTypes, OrderType orderType, OnResponseListener onResponseListener)
Gets the groups that the current user can check If you want to get a specific group information, you can use keyword of its name Search according to group types joinTypes including CREATE (you created), JOINED (you have joined), CANJOIN (you can join)void
getInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets insight resourcestatic IPortalService
getInstance()
Gets the only instance of IPortalServicejava.lang.String
getIPortalServiceHost()
Gets ip of the host currently logged invoid
getMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets dashboard resourcevoid
getMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
Map resourcevoid
getMyAccount(OnResponseListener onResponseListener)
Gets my account informationvoid
getMyDataID(java.lang.String fileName, java.lang.String tags, DataItemType type, OnResponseListener onResponseListener)
Before uploading data, its ID needs to be requestingvoid
getMyDatas(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
My datavoid
getMyInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my insightsvoid
getMyMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets My Dashboardvoid
getMyMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
My Mapvoid
getMyScenes(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my scenevoid
getMyServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my servicevoid
getRestMaps(java.lang.String restUrl, OnResponseListener onResponseListener)
Gets the rest map list (GET)void
getScenes(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets scene resourcevoid
getServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets service resourcevoid
getUserGroupsInfo(int currentPage, int pageSize, GroupOrderBy groupOrderBy, java.lang.String keywords, OrderType orderType, OnResponseListener onResponseListener)
Gets the groups that the current user createdvoid
getWebMap(int mapid, OnResponseListener onResponseListener)
WebMap resource is content resource of maps GET: gets content of the specified mapvoid
inviteUsersToGroup(java.lang.String groupId, java.lang.String inviteReason, java.util.List<java.lang.String> inviteNames, OnResponseListener onResponseListener)
Invites other member which doesn't belong to the group Supports inviting members in bulk Only has the creator of the group the privilege.void
login(java.lang.String host, int port, java.lang.String pathSegments, java.lang.String username, java.lang.String password, boolean rememberme)
User logs invoid
login(java.lang.String portalUrl, java.lang.String username, java.lang.String password, boolean rememberme)
User logs invoid
logout()
User logs outvoid
queryUserByName(java.lang.String name, OnResponseListener onResponseListener)
Searches the user according to its nickname or user namevoid
shareDataToGroup(java.util.List<java.lang.String> dataIds, java.lang.String groupId, OnResponseListener onResponseListener)
Shares private data to groups in bulk using data IDvoid
updateEmail(java.lang.String email, OnResponseListener onResponseListener)
Modifies E-mailvoid
updateNickname(java.lang.String nickname, OnResponseListener onResponseListener)
Modifies a nicknamevoid
updatePassword(java.lang.String newPassword, java.lang.String originPassword, OnResponseListener onResponseListener)
Modifies a passwordvoid
updateSecurityQuestion(java.lang.String pwdQuestion, java.lang.String pwdAnswer, OnResponseListener onResponseListener)
Modifies the security questionvoid
updateWebMap(int mapid, org.json.JSONObject jsonRequst, OnResponseListener onResponseListener)
WebMap resource is content resource of maps PUT: modifies content of the specified mapvoid
updateWebMap(int mapid, java.lang.String jsonRequst, OnResponseListener onResponseListener)
WebMap resource is content resource of maps PUT: modifies content of the specified mapvoid
uploadData(java.lang.String path, int dataID, UploadListener uploadListener)
When uploading data, its ID is required.
-
-
-
Method Detail
-
getInstance
public static IPortalService getInstance()
Gets the only instance of IPortalService
-
addOnResponseListener
public void addOnResponseListener(OnResponseListener listener)
Adds the listener of Internet requesting- Parameters:
listener
- the listener of Internet requesting
-
getIPortalServiceHost
public java.lang.String getIPortalServiceHost()
Gets ip of the host currently logged in
-
login
public void login(java.lang.String host, int port, java.lang.String pathSegments, java.lang.String username, java.lang.String password, boolean rememberme)
User logs in- Parameters:
host
- the host addressport
- Port NumberpathSegments
- the path segmentsusername
- usernamepassword
- Passwordrememberme
- Whether to remember the password
-
login
public void login(java.lang.String portalUrl, java.lang.String username, java.lang.String password, boolean rememberme)
User logs in- Parameters:
portalUrl
- root address of iPortal serviceusername
- usernamepassword
- Passwordrememberme
- Whether to remember the password
-
logout
public void logout()
User logs out
-
getMyMaps
public void getMyMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
My Map- Parameters:
searchParameter
- Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.
-
getMaps
public void getMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
Map resource- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.
-
getMyDatas
public void getMyDatas(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
My data- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.
-
getDatas
public void getDatas(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
Data resource (GET)- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.
-
getMyDataID
public void getMyDataID(java.lang.String fileName, java.lang.String tags, DataItemType type, OnResponseListener onResponseListener)
Before uploading data, its ID needs to be requesting- Parameters:
fileName
- the name of the filetags
- file tagtype
- The file typeonResponseListener
- callback
-
uploadData
public void uploadData(java.lang.String path, int dataID, UploadListener uploadListener)
When uploading data, its ID is required. (please request ID and then upload data)- Parameters:
path
- Data completed pathdatasets
- data IDuploadListener
- add the uploading listener
-
cancelUpload
public void cancelUpload(Call mUploadCall)
Cancels the currently uploading task- Parameters:
mUploadCall
- the uploading callback
-
downloadMyData
public void downloadMyData(int dataID, DownloadListener downloadListener)
Downloads my data- Parameters:
datasets
- data IDdownloadListener
- add the downloading listener
-
downloadData
public void downloadData(int dataID, DownloadListener downloadListener)
Downloads from Data Center- Parameters:
datasets
- data IDdownloadListener
- add the downloading listener
-
cancelDownload
public void cancelDownload(Call downloadCall)
Cancels the currently downloading task- Parameters:
downloadCall
- the download callback
-
getMyServices
public void getMyServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my service- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getServices
public void getServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets service resource- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getMyScenes
public void getMyScenes(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my scene- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getScenes
public void getScenes(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets scene resource- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getMyInsights
public void getMyInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets my insights- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getInsights
public void getInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets insight resource- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getMyMapDashboards
public void getMyMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets My Dashboard- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getMapDashboards
public void getMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
Gets dashboard resource- Parameters:
searchParameter
- Searching parameter. searchParameter Searching parameter. searchParameter corresponds with each requesting parameter of each resource item in iPortal help document.onResponseListener
- request callback
-
getMyAccount
public void getMyAccount(OnResponseListener onResponseListener)
Gets my account information- Parameters:
onResponseListener
- request callback
-
deleteMyContentItem
public void deleteMyContentItem(MyContentType type, int ID, OnResponseListener onResponseListener)
Deletes my resource- Parameters:
type
- The resource typeID
- resource IDonResponseListener
- request callback
-
updateNickname
public void updateNickname(java.lang.String nickname, OnResponseListener onResponseListener)
Modifies a nickname- Parameters:
nickname
- New nicknameonResponseListener
- request callback
-
updatePassword
public void updatePassword(java.lang.String newPassword, java.lang.String originPassword, OnResponseListener onResponseListener)
Modifies a password- Parameters:
newPassword
- New passwordoriginPassword
- original passwordonResponseListener
- request callback
-
updateSecurityQuestion
public void updateSecurityQuestion(java.lang.String pwdQuestion, java.lang.String pwdAnswer, OnResponseListener onResponseListener)
Modifies the security question- Parameters:
pwdQuestion
- the security questionpwdAnswer
- the answer of the security questiononResponseListener
- request callback
-
updateEmail
public void updateEmail(java.lang.String email, OnResponseListener onResponseListener)
Modifies E-mail- Parameters:
email
- new Email addressonResponseListener
- request callback
-
getWebMap
public void getWebMap(int mapid, OnResponseListener onResponseListener)
WebMap resource is content resource of maps GET: gets content of the specified map- Parameters:
mapid
- map IDonResponseListener
- request callback
-
updateWebMap
public void updateWebMap(int mapid, java.lang.String jsonRequst, OnResponseListener onResponseListener)
WebMap resource is content resource of maps PUT: modifies content of the specified map- Parameters:
mapid
- map IDjsonRequst
- The string request bodyonResponseListener
- request callback
-
updateWebMap
public void updateWebMap(int mapid, org.json.JSONObject jsonRequst, OnResponseListener onResponseListener)
WebMap resource is content resource of maps PUT: modifies content of the specified map- Parameters:
mapid
- map IDjsonRequst
- JSON request bodyonResponseListener
- request callback
-
getRestMaps
public void getRestMaps(java.lang.String restUrl, OnResponseListener onResponseListener)
Gets the rest map list (GET)- Parameters:
restUrl
- rest map serviceonResponseListener
- request callback
-
getGroupsInfo
public void getGroupsInfo(int currentPage, int pageSize, GroupOrderBy groupOrderBy, java.lang.String keywords, JoinTypes joinTypes, OrderType orderType, OnResponseListener onResponseListener)
Gets the groups that the current user can check If you want to get a specific group information, you can use keyword of its name Search according to group types joinTypes including CREATE (you created), JOINED (you have joined), CANJOIN (you can join)- Parameters:
currentPage
- the current page numberpageSize
- the number of lines in the current pagegroupOrderBy
- ordering groups byorderType
- ordering types. Ascending (ASC) or descending (DESC)keywords
- keyword query (if you don't need it, set it to null)joinTypes
- the group typesonResponseListener
- request callback
-
getUserGroupsInfo
public void getUserGroupsInfo(int currentPage, int pageSize, GroupOrderBy groupOrderBy, java.lang.String keywords, OrderType orderType, OnResponseListener onResponseListener)
Gets the groups that the current user created- Parameters:
currentPage
- the current page numberpageSize
- the number of lines in the current pagegroupOrderBy
- ordering groups byorderType
- ordering types. Ascending (ASC) or descending (DESC)keywords
- keyword (null is acceptable)onResponseListener
- request callback
-
createGroup
public void createGroup(java.lang.String groupName, java.lang.String tags, boolean isPublic, java.lang.String description, GroupRole groupRole, boolean isNeedCheck, OnResponseListener onResponseListener)
Create a group- Parameters:
groupName
- the group nametags
- the group tagisPublic
- whether to public itdescription
- group informationgroupRole
- the resource sharer of groupisNeedCheck
- whether to verify the user who applies to join a grouponResponseListener
- request callback
-
deleteGroup
public void deleteGroup(java.util.List<java.lang.String> groupsIds, OnResponseListener onResponseListener)
Deletes groups in bulk- Parameters:
groupsIds
- group ID collectiononResponseListener
- request callback
-
shareDataToGroup
public void shareDataToGroup(java.util.List<java.lang.String> dataIds, java.lang.String groupId, OnResponseListener onResponseListener)
Shares private data to groups in bulk using data ID- Parameters:
dataIds
- file Id collectiongroupId
- group IdonResponseListener
- request callback
-
getGroupInfo
public void getGroupInfo(java.lang.String groupId, OnResponseListener onResponseListener)
Checks resource information of a group- Parameters:
groupId
- group IdonResponseListener
- request callback
-
getGroupResources
public void getGroupResources(java.lang.String groupId, int currentPage, int pageSize, java.lang.String keywords, ResourceOrderBy resourceOrderBy, OrderType orderType, java.lang.String resourceCreator, OnResponseListener onResponseListener)
Check data resource of a group Once members of a group get data ID, they can download data directly- Parameters:
groupId
- group IdcurrentPage
- the current page numberpageSize
- the number of lines in the current pagekeywords
- the keywords.groupOrderBy
- ordering groups byorderType
- ordering types. Ascending (ASC) or descending (DESC)resourceCreator
- the resource creatoronResponseListener
- request callback
-
inviteUsersToGroup
public void inviteUsersToGroup(java.lang.String groupId, java.lang.String inviteReason, java.util.List<java.lang.String> inviteNames, OnResponseListener onResponseListener)
Invites other member which doesn't belong to the group Supports inviting members in bulk Only has the creator of the group the privilege.- Parameters:
groupId
- The target group idinviteReason
- the reason why you want to invite a memberinviteNames
- the name of user to be invitedonResponseListener
- request callback
-
applyToGroup
public void applyToGroup(java.lang.String groupId, java.lang.String applyReason, java.lang.String applicant, OnResponseListener onResponseListener)
User applies for adding a group If join a group does not need to verify, user can join it directly. Otherwise, user can join a group until the creator agreesThe name of applicant must be the same as the current user
- Parameters:
groupId
- The target group idapplyReason
- the reason why you want to join the groupapplicant
- the applicantonResponseListener
- request callback
-
checkGroupApply
public void checkGroupApply(java.lang.String groupId, java.util.List<java.lang.String> userIds, boolean isAccepted, OnResponseListener onResponseListener)
Checks all applications of the current group in bulk. Supports auditing the specific application according to its id- Parameters:
groupId
- group IDuserIds
- user IDisAccepted
- whether to pass the auditonResponseListener
- request callback
-
getGroupApply
public void getGroupApply(java.lang.String groupId, int currentPage, int pageSize, GroupCheckStatus groupCheckStatus, OrderType orderType, OnResponseListener onResponseListener)
Gets the application list information of the current group Including application information, passed application information, and privileged audit.- Parameters:
groupId
- group IDcurrentPage
- the current page numberpageSize
- the number of records in the current pageorderType
- ordering types. Ascending (ASC) or descending (DESC)groupCheckStatus
- the statusonResponseListener
- request callback
-
queryUserByName
public void queryUserByName(java.lang.String name, OnResponseListener onResponseListener)
Searches the user according to its nickname or user name- Parameters:
name
- nickname or user nameonResponseListener
- request callback
-
-