public abstract class LinkCreateRequest extends BaseFssApiResource
UTF_8| Modifier and Type | Method and Description |
|---|---|
static LinkCreateRequest |
create(FssApiVersion apiVersion,
java.io.InputStreamReader reader)
Constructs a LinkCreateRequest from the JSON string representation contained in reader.
|
static LinkCreateRequest |
create(FssApiVersion apiVersion,
java.lang.String path,
java.lang.Integer expirationDays,
java.lang.Boolean publicLink,
boolean accessCode,
java.util.Set<LinkPermission> permissions)
Returns a versioned LinkCreateRequest that is compatible with the specified apiVersion.
|
static LinkCreateRequest |
create(FssApiVersion apiVersion,
java.lang.String path,
java.lang.Integer expirationDays,
java.lang.Boolean publicLink,
boolean accessCode,
java.util.Set<LinkPermission> permissions,
java.lang.String uniqueId)
Returns a versioned LinkCreateRequest that is compatible with the specified apiVersion.
|
java.lang.Integer |
getExpirationDays()
Returns the number of days until the link should expire.
|
static java.lang.Class<? extends LinkCreateRequest> |
getFssApiClass(FssApiVersion apiVersion)
Returns the
Class of the LinkCreateRequest that corresponds to the
specified apiVersion. |
abstract java.lang.String |
getObjectIdentifier()
Returns the value used to identify the entry for which to create a link
|
java.lang.String |
getPath()
Returns the path to the entry for which to create a link.
|
java.util.Set<LinkPermission> |
getPermissions()
Returns the set of permissions for this link.
|
boolean |
hasAccessCode()
Returns whether or not to use an access code for this link.
|
abstract boolean |
hasUniqueId()
Returns whether the LinkCreateRequest has a uniqueId value
|
java.lang.Boolean |
isPublicLink()
Returns whether or not this link should be publicly accessible (accessible without a username
and password).
|
void |
validate(java.lang.String fieldName,
BaseFssApiResource parent)
Validates this object.
|
protected abstract void |
validateObjectIdentifierToLink(java.lang.String fieldName)
Validates that the specified argument that is used as the object identifier
for creating a link is not null
|
badValue, badValue, fromJson, toJson, toJson, toString, validate, validateFieldInRange, validateFieldInRange, validateFieldIsNull, validateFieldNotNull, validateLocale, validateOptionalField, validateOptionalFieldList, validateRequiredField, validateRequiredFieldList, writeToOutputStreampublic static java.lang.Class<? extends LinkCreateRequest> getFssApiClass(FssApiVersion apiVersion) throws AwUnsupportedApiVersionException
Class of the LinkCreateRequest that corresponds to the
specified apiVersion.apiVersion - API version of the class to be returnedClass of the LinkCreateRequest that corresponds to the
specified apiVersionAwUnsupportedApiVersionExceptionpublic static LinkCreateRequest create(FssApiVersion apiVersion, java.lang.String path, java.lang.Integer expirationDays, java.lang.Boolean publicLink, boolean accessCode, java.util.Set<LinkPermission> permissions) throws AwUnsupportedApiVersionException
apiVersion - API version to be supported by the LinkCreateRequestpath - path to the file or folderexpirationDays - optionally, the number of days that the link remains active. If null, then the
default number of days from the server will be usedpublicLink - optionally, whether the link is publicly accessible. If null, then the server
default will be usedaccessCode - whether to protect the link with an access codepermissions - the permissions for this link (read, write)AwUnsupportedApiVersionExceptionpublic static LinkCreateRequest create(FssApiVersion apiVersion, java.lang.String path, java.lang.Integer expirationDays, java.lang.Boolean publicLink, boolean accessCode, java.util.Set<LinkPermission> permissions, java.lang.String uniqueId) throws AwUnsupportedApiVersionException
apiVersion - API version to be supported by the LinkCreateRequestexpirationDays - optionally, the number of days that the link remains active. If null, then the
default number of days from the server will be usedpublicLink - optionally, whether the link is publicly accessible. If null, then the server
default will be usedaccessCode - whether to protect the link with an access codepermissions - the permissions for this link (read, write)uniqueId - uniqueId to the file or folderAwUnsupportedApiVersionExceptionpublic static LinkCreateRequest create(FssApiVersion apiVersion, java.io.InputStreamReader reader) throws AwJsonException, AwUnsupportedApiVersionException
apiVersion - API version of the object to be read from readerreader - contains the JSON representation of a DeletePathRequestAwJsonExceptionAwUnsupportedApiVersionExceptionpublic void validate(java.lang.String fieldName,
BaseFssApiResource parent)
throws AwJsonException
validate in class BaseFssApiResourcefieldName - name of this object in the parent (containing) object. If this object is a
top-level object (not contained within another object), then enter null for this
parameterparent - parent (containing) object that contains the object specified in the fieldName
parameter. If this object is a top-level object (not contained within another
object), then enter null for this parameterAwJsonException - if any validation errors occurBaseFssApiResource.validate(String, BaseFssApiResource)protected abstract void validateObjectIdentifierToLink(java.lang.String fieldName)
throws AwJsonException
fieldName - AwJsonExceptionpublic java.lang.String getPath()
public java.lang.Integer getExpirationDays()
public java.lang.Boolean isPublicLink()
public boolean hasAccessCode()
public java.util.Set<LinkPermission> getPermissions()
public abstract java.lang.String getObjectIdentifier()
public abstract boolean hasUniqueId()