public static class DASemantics.ShExtFilev2 extends DASemantics.SemanticHandler
args
0: uploads,
1: uri - uri field,
2: sub-folder level 0,
3: sub-folder level 1,
... ,
-1: client-name for saving readable file name
For large file, use stream asynchronous mode, otherwise it's performance problem here.
Whether uses or not a stream mode file up down loading is a business tier decision by semantic-jserv. See Anclient.jave/album test for example.
Modifier and Type | Field and Description |
---|---|
static int |
ixExtRoot
Saving root.
The path rooted from return of ISemantext.relativpath(String...) . |
Constructor and Description |
---|
ShExtFilev2(io.odysz.transact.sql.Transcxt trxt,
String tabl,
String pk,
String[] args) |
Modifier and Type | Method and Description |
---|---|
String |
getFileRoot() |
protected void |
onDelete(io.odysz.semantics.ISemantext stx,
io.odysz.transact.sql.Statement<? extends io.odysz.transact.sql.Statement<?>> stmt,
io.odysz.transact.sql.parts.condition.Condit condt,
io.odysz.semantics.IUser usr)
Handle onDelete event.
|
protected void |
onInsert(io.odysz.semantics.ISemantext stx,
io.odysz.transact.sql.Insert insrt,
ArrayList<Object[]> row,
Map<String,Integer> cols,
io.odysz.semantics.IUser usr) |
protected void |
onUpdate(io.odysz.semantics.ISemantext stx,
io.odysz.transact.sql.Update updt,
ArrayList<Object[]> row,
Map<String,Integer> cols,
io.odysz.semantics.IUser usr)
On updating external files' handler.
|
protected String |
selectUri(io.odysz.semantics.ISemantext stx,
io.odysz.transact.sql.Statement<?> stmt,
io.odysz.transact.sql.parts.condition.Condit pk,
io.odysz.semantics.IUser usr) |
is, key, logi, onPost
public static final int ixExtRoot
ISemantext.relativpath(String...)
.public ShExtFilev2(io.odysz.transact.sql.Transcxt trxt, String tabl, String pk, String[] args) throws SemanticException
SemanticException
public String getFileRoot()
protected void onInsert(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Insert insrt, ArrayList<Object[]> row, Map<String,Integer> cols, io.odysz.semantics.IUser usr) throws SemanticException
onInsert
in class DASemantics.SemanticHandler
SemanticException
protected void onUpdate(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Update updt, ArrayList<Object[]> row, Map<String,Integer> cols, io.odysz.semantics.IUser usr) throws SemanticException
On updating external files' handler.
This method only moves the file with new uri & client name, applying the semantics predefined as:
AS all files are treated as binary file, no file can be modified, only delete then create it makes sense.
Client should avoid updating an external file while handling business logics.
NOTE:
This can be changed in the future.
onUpdate
in class DASemantics.SemanticHandler
SemanticException
DASemantics.SemanticHandler.onUpdate(ISemantext, Update, ArrayList, Map, IUser)
protected String selectUri(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Statement<?> stmt, io.odysz.transact.sql.parts.condition.Condit pk, io.odysz.semantics.IUser usr) throws SemanticException
SemanticException
protected void onDelete(io.odysz.semantics.ISemantext stx, io.odysz.transact.sql.Statement<? extends io.odysz.transact.sql.Statement<?>> stmt, io.odysz.transact.sql.parts.condition.Condit condt, io.odysz.semantics.IUser usr) throws SemanticException
DASemantics.SemanticHandler
onDelete
in class DASemantics.SemanticHandler
condt
- delete statement's condition.SemanticException
Copyright © 2024. All rights reserved.