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 requesting
      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.
      void cancelDownload(Call downloadCall)
      Cancels the currently downloading task
      void cancelUpload(Call mUploadCall)
      Cancels the currently uploading task
      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.
      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
      void deleteGroup(java.util.List<java.lang.String> groupsIds, OnResponseListener onResponseListener)
      Deletes groups in bulk
      void deleteMyContentItem(MyContentType type, int ID, OnResponseListener onResponseListener)
      Deletes my resource
      void downloadData(int dataID, DownloadListener downloadListener)
      Downloads from Data Center
      void downloadMyData(int dataID, DownloadListener downloadListener)
      Downloads my data
      void 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 group
      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
      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)
      void getInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets insight resource
      static IPortalService getInstance()
      Gets the only instance of IPortalService
      java.lang.String getIPortalServiceHost()
      Gets ip of the host currently logged in
      void getMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets dashboard resource
      void getMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
      Map resource
      void getMyAccount(OnResponseListener onResponseListener)
      Gets my account information
      void getMyDataID(java.lang.String fileName, java.lang.String tags, DataItemType type, OnResponseListener onResponseListener)
      Before uploading data, its ID needs to be requesting
      void getMyDatas(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
      My data
      void getMyInsights(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets my insights
      void getMyMapDashboards(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets My Dashboard
      void getMyMaps(java.util.HashMap<java.lang.String,java.lang.String> searchParameter)
      My Map
      void getMyScenes(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets my scene
      void getMyServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets my service
      void 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 resource
      void getServices(java.util.HashMap<java.lang.String,java.lang.String> searchParameter, OnResponseListener onResponseListener)
      Gets service resource
      void getUserGroupsInfo(int currentPage, int pageSize, GroupOrderBy groupOrderBy, java.lang.String keywords, OrderType orderType, OnResponseListener onResponseListener)
      Gets the groups that the current user created
      void getWebMap(int mapid, OnResponseListener onResponseListener)
      WebMap resource is content resource of maps GET: gets content of the specified map
      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.
      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
      void login(java.lang.String portalUrl, java.lang.String username, java.lang.String password, boolean rememberme)
      User logs in
      void logout()
      User logs out
      void queryUserByName(java.lang.String name, OnResponseListener onResponseListener)
      Searches the user according to its nickname or user name
      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
      void updateEmail(java.lang.String email, OnResponseListener onResponseListener)
      Modifies E-mail
      void updateNickname(java.lang.String nickname, OnResponseListener onResponseListener)
      Modifies a nickname
      void updatePassword(java.lang.String newPassword, java.lang.String originPassword, OnResponseListener onResponseListener)
      Modifies a password
      void updateSecurityQuestion(java.lang.String pwdQuestion, java.lang.String pwdAnswer, OnResponseListener onResponseListener)
      Modifies the security question
      void updateWebMap(int mapid, org.json.JSONObject jsonRequst, OnResponseListener onResponseListener)
      WebMap resource is content resource of maps PUT: modifies content of the specified map
      void updateWebMap(int mapid, java.lang.String jsonRequst, OnResponseListener onResponseListener)
      WebMap resource is content resource of maps PUT: modifies content of the specified map
      void uploadData(java.lang.String path, int dataID, UploadListener uploadListener)
      When uploading data, its ID is required.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IPortalService

        public IPortalService()
    • 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 address
        port - Port Number
        pathSegments - the path segments
        username - username
        password - Password
        rememberme - 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 service
        username - username
        password - Password
        rememberme - 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 file
        tags - file tag
        type - The file type
        onResponseListener - 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 path
        datasets - data ID
        uploadListener - 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 ID
        downloadListener - add the downloading listener
      • downloadData

        public void downloadData(int dataID,
                                 DownloadListener downloadListener)
        Downloads from Data Center
        Parameters:
        datasets - data ID
        downloadListener - 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 type
        ID - resource ID
        onResponseListener - request callback
      • updateNickname

        public void updateNickname(java.lang.String nickname,
                                   OnResponseListener onResponseListener)
        Modifies a nickname
        Parameters:
        nickname - New nickname
        onResponseListener - request callback
      • updatePassword

        public void updatePassword(java.lang.String newPassword,
                                   java.lang.String originPassword,
                                   OnResponseListener onResponseListener)
        Modifies a password
        Parameters:
        newPassword - New password
        originPassword - original password
        onResponseListener - request callback
      • updateSecurityQuestion

        public void updateSecurityQuestion(java.lang.String pwdQuestion,
                                           java.lang.String pwdAnswer,
                                           OnResponseListener onResponseListener)
        Modifies the security question
        Parameters:
        pwdQuestion - the security question
        pwdAnswer - the answer of the security question
        onResponseListener - request callback
      • updateEmail

        public void updateEmail(java.lang.String email,
                                OnResponseListener onResponseListener)
        Modifies E-mail
        Parameters:
        email - new Email address
        onResponseListener - 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 ID
        onResponseListener - 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 ID
        jsonRequst - The string request body
        onResponseListener - 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 ID
        jsonRequst - JSON request body
        onResponseListener - request callback
      • getRestMaps

        public void getRestMaps(java.lang.String restUrl,
                                OnResponseListener onResponseListener)
        Gets the rest map list (GET)
        Parameters:
        restUrl - rest map service
        onResponseListener - 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 number
        pageSize - the number of lines in the current page
        groupOrderBy - ordering groups by
        orderType - ordering types. Ascending (ASC) or descending (DESC)
        keywords - keyword query (if you don't need it, set it to null)
        joinTypes - the group types
        onResponseListener - 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 number
        pageSize - the number of lines in the current page
        groupOrderBy - ordering groups by
        orderType - 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 name
        tags - the group tag
        isPublic - whether to public it
        description - group information
        groupRole - the resource sharer of group
        isNeedCheck - whether to verify the user who applies to join a group
        onResponseListener - request callback
      • deleteGroup

        public void deleteGroup(java.util.List<java.lang.String> groupsIds,
                                OnResponseListener onResponseListener)
        Deletes groups in bulk
        Parameters:
        groupsIds - group ID collection
        onResponseListener - 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 collection
        groupId - group Id
        onResponseListener - request callback
      • getGroupInfo

        public void getGroupInfo(java.lang.String groupId,
                                 OnResponseListener onResponseListener)
        Checks resource information of a group
        Parameters:
        groupId - group Id
        onResponseListener - 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 Id
        currentPage - the current page number
        pageSize - the number of lines in the current page
        keywords - the keywords.
        groupOrderBy - ordering groups by
        orderType - ordering types. Ascending (ASC) or descending (DESC)
        resourceCreator - the resource creator
        onResponseListener - 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 id
        inviteReason - the reason why you want to invite a member
        inviteNames - the name of user to be invited
        onResponseListener - 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 agrees

        The name of applicant must be the same as the current user

        Parameters:
        groupId - The target group id
        applyReason - the reason why you want to join the group
        applicant - the applicant
        onResponseListener - 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 ID
        userIds - user ID
        isAccepted - whether to pass the audit
        onResponseListener - 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 ID
        currentPage - the current page number
        pageSize - the number of records in the current page
        orderType - ordering types. Ascending (ASC) or descending (DESC)
        groupCheckStatus - the status
        onResponseListener - 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 name
        onResponseListener - request callback