public abstract class EntityUpdateResUploadActionTransformer<T> extends EntityResourceUploadActionTransformer<T>
EntityResourceUploadActionTransformer
dao
Constructor and Description |
---|
EntityUpdateResUploadActionTransformer() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
constructPath(T entity,
Map context,
FacetMeta fm,
String path,
int sequenceCode,
List fieldValues) |
protected String |
derivePath(T entity,
Map context,
String path)
Use the raw path to convert it to desired path, associate it with the entity; and return the same 'desired path'.
|
FacetMeta |
getRelatedField()
The
FacetMeta for the field, in the entity that will be updated and sequence number derived (if FacetMeta.isCollectionType() ).If the context provides it and this is null then the context FacetMeta (key name facetMeta), will be used. |
FileUploadWrapper |
getResourceUploader()
Figure Web-relative paths for uploads etc from absolute path
|
protected int |
getSequenceCode(List fieldValues)
Default impl simply checks size.
|
Boolean |
isRelatedFieldAsList()
If true will convert paths into one comma separated String or else it will be a List.
|
protected String |
relativePath(String renamedPath)
By Default it converts an absolute path to a web relative URL (if the application settins are to store web relative paths instead of absolute ones)
|
void |
setRelatedField(FacetMeta relatedField)
The
FacetMeta for the field, in the entity that will be updated and sequence number derived (if FacetMeta.isCollectionType() ).If the context provides it and this is null then the context FacetMeta (key name facetMeta), will be used. |
void |
setRelatedFieldAsList(Boolean relatedFieldAsList)
If true will convert paths into one comma separated String or else it will be a List.
|
void |
setResourceUploader(FileUploadWrapper resourceUploader)
Figure Web-relative paths for uploads etc from absolute path
|
protected String |
validate(String renamedPath,
T entity,
Map context,
FacetMeta fm,
String path,
int sequenceCode,
List fieldValues)
An opportunity to validate the renamedPath with the environment.
|
getAction, getDao, getObjectIdNumberType, setAction, setDao, setObjectIdNumberType, transform
public EntityUpdateResUploadActionTransformer()
protected int getSequenceCode(List fieldValues)
fieldValues
- as Listprotected abstract String constructPath(T entity, Map context, FacetMeta fm, String path, int sequenceCode, List fieldValues)
protected String validate(String renamedPath, T entity, Map context, FacetMeta fm, String path, int sequenceCode, List fieldValues) throws Exception
Transformer
.protected String relativePath(String renamedPath) throws Exception
renamedPath
- Exception
protected String derivePath(T entity, Map context, String path) throws Exception
derivePath
in class EntityResourceUploadActionTransformer<T>
entity
- as Tcontext
- as Mappath
- as StringException
public FacetMeta getRelatedField()
FacetMeta
for the field, in the entity that will be updated and sequence number derived (if FacetMeta.isCollectionType()
).FacetMeta
(key name facetMeta), will be used.public void setRelatedField(FacetMeta relatedField)
FacetMeta
for the field, in the entity that will be updated and sequence number derived (if FacetMeta.isCollectionType()
).FacetMeta
(key name facetMeta), will be used.public Boolean isRelatedFieldAsList()
public void setRelatedFieldAsList(Boolean relatedFieldAsList)
public FileUploadWrapper getResourceUploader()
FileUploadWrapper
public void setResourceUploader(FileUploadWrapper resourceUploader)
FileUploadWrapper
Copyright © 2018. All rights reserved.