Package com.esri.arcgisruntime.portal
Class PortalItemContentParameters
- java.lang.Object
-
- com.esri.arcgisruntime.portal.PortalItemContentParameters
-
public final class PortalItemContentParameters extends java.lang.Object
Specifies the content for a new portal item to be added. Instances of this class are passed toPortalUser.addPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder)
.- Since:
- 100.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PortalItemContentParameters.PortalItemContentType
Specifies the type of content represented by a PortalItemContentParameters instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PortalItemContentParameters
createFileContent(java.io.File file, java.lang.String fileName)
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is a file.static PortalItemContentParameters
createJsonContent(java.lang.String jsonText)
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content data is JSON text.static PortalItemContentParameters
createUrlContent(java.lang.String url)
Creates an instance of PortalItemContentParameters to use when adding a portal item for which the content is a URL.java.io.File
getFile()
Gets the File containing the content.java.lang.String
getFileName()
Gets the file name to use to store the data.java.lang.String
getJsonText()
Gets the JSON content data.PortalItemContentParameters.PortalItemContentType
getType()
Gets the PortalItemContentType.java.lang.String
getUrl()
Gets the URL.
-
-
-
Method Detail
-
createFileContent
public static PortalItemContentParameters createFileContent(java.io.File file, java.lang.String fileName)
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:
java.lang.IllegalArgumentException
- if file is nulljava.lang.IllegalArgumentException
- if fileName is null or empty- Since:
- 100.3.0
- See Also:
PortalUser.addPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder)
-
createJsonContent
public static PortalItemContentParameters createJsonContent(java.lang.String jsonText)
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:
java.lang.IllegalArgumentException
- if jsonText is null or empty- Since:
- 100.0.0
- See Also:
PortalUser.addPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder)
-
createUrlContent
public static PortalItemContentParameters createUrlContent(java.lang.String url)
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:
java.lang.IllegalArgumentException
- if url is null or empty- Since:
- 100.3.0
- See Also:
PortalUser.addPortalItemAsync(PortalItem, PortalItemContentParameters, PortalFolder)
-
getType
public PortalItemContentParameters.PortalItemContentType getType()
Gets the PortalItemContentType.- Returns:
- the PortalItemContentType
- Since:
- 100.0.0
-
getFile
public java.io.File 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
public java.lang.String 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
public java.lang.String getJsonText()
Gets the JSON content data.- Returns:
- the content data, or null if content is not JSON text
- Since:
- 100.0.0
-
getUrl
public java.lang.String getUrl()
Gets the URL.- Returns:
- the URL, or null if content is not a URL
- Since:
- 100.3.0
-
-