Class RequestProperty
java.lang.Object
org.apache.sling.servlets.post.impl.helper.RequestProperty
Encapsulates all infos from the respective request parameters that are needed
to create the repository property
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetChunk()
getName()
getPath()
get the source of a copy or move operationString[]
Returns the assembled string array out of the provided request values and default values.boolean
boolean
if this is the source of a copy actionboolean
If this is a target of a move operationboolean
boolean
it this is a chunk upload?boolean
isDelete()
Determine the deletion status of this itemboolean
boolean
isPatch()
determines if this property is handled as multi-value propertyboolean
Checks if this property provides any values. this is the case if one of the values is not empty or if the default handling is not 'ignore'void
void
setDefaultValues
(RequestParameter[] defaultValues) void
setDelete
(boolean isDelete) Specifies whether this property should be deleted before any new content is to be set according to the values stored.void
setIgnoreBlanks
(boolean b) void
setPatch
(boolean b) void
setRepositorySource
(String sourcePath, boolean isMove) Sets the path of the repository item from which the content for this property is to be copied or moved.void
setTypeHintValue
(String typeHint) void
setUseDefaultWhenMissing
(boolean b) void
setValues
(RequestParameter[] values)
-
Field Details
-
DEFAULT_IGNORE
- See Also:
-
DEFAULT_NULL
- See Also:
-
-
Constructor Details
-
RequestProperty
-
-
Method Details
-
getTypeHint
-
hasMultiValueTypeHint
public boolean hasMultiValueTypeHint() -
setTypeHintValue
-
getPath
-
getName
-
getParentPath
-
hasValues
public boolean hasValues() -
getValues
-
setValues
-
getDefaultValues
-
setDefaultValues
-
isFileUpload
public boolean isFileUpload() -
providesValue
public boolean providesValue()Checks if this property provides any values. this is the case if one of the values is not empty or if the default handling is not 'ignore'- Returns:
true
if this property provides values
-
getStringValues
Returns the assembled string array out of the provided request values and default values.- Returns:
- a String array or
null
if the property needs to be removed.
-
setDelete
public void setDelete(boolean isDelete) Specifies whether this property should be deleted before any new content is to be set according to the values stored.- Parameters:
isDelete
-true
if the repository item described by this is to be deleted before any other operation.
-
isDelete
public boolean isDelete()Determine the deletion status of this item- Returns:
true
if the repository item described by this is to be deleted before setting new content to it.
-
setRepositorySource
Sets the path of the repository item from which the content for this property is to be copied or moved. The path may be relative in which case it will be resolved relative to the absolute path of this property.- Parameters:
sourcePath
- The path of the repository item to get the content fromisMove
-true
if the source content is to be moved, otherwise the source content is copied from the repository item.
-
hasRepositoryMoveSource
public boolean hasRepositoryMoveSource()If this is a target of a move operation- Returns:
true
if the content of this property is to be set by moving content from another repository item.- See Also:
-
hasRepositoryCopySource
public boolean hasRepositoryCopySource()if this is the source of a copy action- Returns:
true
if the content of this property is to be set by copying content from another repository item.- See Also:
-
getRepositorySource
get the source of a copy or move operation- Returns:
- the absolute path of the repository item from which the content for this property is to be copied or moved.
- See Also:
-
setIgnoreBlanks
public void setIgnoreBlanks(boolean b) -
setUseDefaultWhenMissing
public void setUseDefaultWhenMissing(boolean b) -
setPatch
public void setPatch(boolean b) -
isPatch
public boolean isPatch()determines if this property is handled as multi-value property- Returns:
- whether this property is to be handled as a multi-value property seen as set.
-
isChunkUpload
public boolean isChunkUpload()it this is a chunk upload?- Returns:
- true if request is chunk upload.
-
getChunk
-
setChunk
-