Module com.esri.arcgisruntime
Package com.esri.arcgisruntime.portal
Class PortalItemContentParameters
java.lang.Object
com.esri.arcgisruntime.portal.PortalItemContentParameters
Specifies the content for a new portal item to be added. Instances of this class are passed to
PortalUser.addPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder).- Since:
- 100.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSpecifies the type of content represented by a PortalItemContentParameters instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic PortalItemContentParameterscreateFileContent(File file, String fileName) Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is a file.static PortalItemContentParameterscreateJsonContent(String jsonText) Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is JSON text.static PortalItemContentParameterscreateUrlContent(String url) Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content is a URL.getFile()Gets the File containing the content.Gets the file name to use to store the data.Gets the JSON content data.getType()Gets the PortalItemContentType.getUrl()Gets the URL.
-
Method Details
-
createFileContent
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is a file.- Parameters:
file- a File containing the content data for the itemfileName- the file name to use to store the data; must be unique within the particular user's folder to which the item is added- Returns:
- an instance of PortalItemContentParameters
- Throws:
IllegalArgumentException- if file is nullIllegalArgumentException- if fileName is null or empty- Since:
- 100.3.0
- See Also:
-
createJsonContent
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is JSON text.- Parameters:
jsonText- a String containing the content data, in JSON format- Returns:
- an instance of PortalItemContentParameters
- Throws:
IllegalArgumentException- if jsonText is null or empty- Since:
- 100.0.0
- See Also:
-
createUrlContent
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content is a URL.- Parameters:
url- a String containing the URL- Returns:
- an instance of PortalItemContentParameters
- Throws:
IllegalArgumentException- if url is null or empty- Since:
- 100.3.0
- See Also:
-
getType
Gets the PortalItemContentType.- Returns:
- the PortalItemContentType
- Since:
- 100.0.0
-
getFile
Gets the File containing the content.- Returns:
- a File containing the content data, or null if content is not a file
- Since:
- 100.3.0
-
getFileName
Gets the file name to use to store the data.- Returns:
- the file name, or null if content is not a file
- Since:
- 100.3.0
-
getJsonText
Gets the JSON content data.- Returns:
- the content data, or null if content is not JSON text
- Since:
- 100.0.0
-
getUrl
Gets the URL.- Returns:
- the URL, or null if content is not a URL
- Since:
- 100.3.0
-