|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.core.portal.Portal
public class Portal
This class is used for connecting to a Portal and searching for items, users and groups. arcgis.com is an example of a portal, using this object a user(anonymous or with credentials) can see the contents of the portal. Using the portal a user can share content with other users that are members of the portal. The user can create content using maps that are public or services published by the the user on a server instance. Note: The API supports connecting to portals running ArcGIS Portal API Version 1.6.2 or higher.
Field Summary | |
---|---|
static String |
DEFAULT_CULTURE
The default locale of the Portal e.g. en-us. |
Constructor Summary | |
---|---|
Portal(String url,
String sharingURL,
UserCredentials credentials)
Instantiates an object of Portal. |
|
Portal(String url,
UserCredentials credentials)
Instantiates an object of Portal. |
Method Summary | |
---|---|
PortalInfo |
fetchPortalInfo()
Fetches the portal information from the server. |
InputStream |
fetchTxtFileContents()
Returns properties from arcgismobile.txt config file. |
PortalUser |
fetchUser()
Fetches the PortalUser set on this portal object from the server. |
String |
fetchVersion()
Fetches the version of the portal. |
PortalQueryResultSet<PortalGroup> |
findGroups(PortalQueryParams queryParams)
Finds groups with a query. |
void |
findGroups(PortalQueryParams queryParams,
PortalListener<PortalQueryResultSet<PortalGroup>> portalListener)
Deprecated. please use findGroups(PortalQueryParams) instead. |
PortalQueryResultSet<PortalItem> |
findItems(PortalQueryParams queryParams)
Finds items with a query. |
void |
findItems(PortalQueryParams queryParams,
PortalListener<PortalQueryResultSet<PortalItem>> portalListener)
Deprecated. please use findItems(PortalQueryParams) instead. |
String |
findSharingUrl()
Returns the portal's sharing url. i.e., https://www.arcgis.com/sharing/rest |
UserCredentials |
getCredentials()
Returns a copy of the user credentials set on this portal object. |
String |
getUrl()
Returns the portal's url. |
boolean |
isPreVersion162()
Returns true if the portal version is earlier than the 1.6.2. |
org.codehaus.jackson.JsonParser |
postRequest(String requestURL)
Sends the customized request and let users handle the response. |
org.codehaus.jackson.JsonParser |
sendRequest(String requestURL)
Sends the customized request and let users handle the response. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CULTURE
Constructor Detail |
---|
public Portal(String url, UserCredentials credentials)
url
- the portal urlcredentials
- the credentials to access the portal with. The credentials is not verified in this constructor.
Invalid credentials can cause security exception in the sub-sequent operations.public Portal(String url, String sharingURL, UserCredentials credentials)
url
- the portal urlsharingURL
- the shareURL changed in 1.6.2 (e.g. http://porturl/sharing/rest), set to null if you don't know
it.credentials
- the credentials to access the portal with. The credentials is not verified in this constructor.
Invalid credentials can cause security exception in the sub-sequent operations.Method Detail |
---|
public InputStream fetchTxtFileContents()
@Deprecated public void findItems(PortalQueryParams queryParams, PortalListener<PortalQueryResultSet<PortalItem>> portalListener)
findItems(PortalQueryParams)
instead.
queryParams
- - the query that is passed to the portalportalListener
- - portal listener that returns the portalpublic PortalQueryResultSet<PortalItem> findItems(PortalQueryParams queryParams) throws Exception
queryParams
- - the query that is passed to the portal
Exception
- If unable to complete the request.@Deprecated public void findGroups(PortalQueryParams queryParams, PortalListener<PortalQueryResultSet<PortalGroup>> portalListener)
findGroups(PortalQueryParams)
instead.
queryParams
- - query parameters used to search the portalportalListener
- - portal listener that returns the portalpublic PortalQueryResultSet<PortalGroup> findGroups(PortalQueryParams queryParams) throws Exception
queryParams
- - query parameters used to search the portal
Exception
- If unable to complete the request.public String getUrl()
public String findSharingUrl()
public UserCredentials getCredentials()
public PortalUser fetchUser() throws Exception
Exception
- If unable to complete the request.public PortalInfo fetchPortalInfo() throws Exception
Exception
- If unable to complete the request.public String fetchVersion() throws Exception
Exception
- the exceptionpublic org.codehaus.jackson.JsonParser sendRequest(String requestURL) throws EsriSecurityException, Exception
requestURL
- the url of the request.
EsriSecurityException
- if failed to pass the security checking.
Exception
- if the request is invalid.public boolean isPreVersion162()
public org.codehaus.jackson.JsonParser postRequest(String requestURL) throws EsriSecurityException, Exception
requestURL
- the url of the request.
EsriSecurityException
- if failed to pass the security checking.
Exception
- if the request is invalid.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |