|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.BasicDataController
public class BasicDataController
This class is a neutral implementation of DataController. It is intended to be used to developp custom DataController. It avoids the sub-class to implement not used methods of DataController. It implements the Comparable interface. This interface is required since JCMS 5.5.0 ; so that DataController can be invoked in a custom order. The order can be set through the constructor. Default order is 0. When 2 BasicDataControllers are equal they are ordered according their class name, then according their hashCode.
Field Summary | |
---|---|
protected int |
order
|
static String |
REVISION
|
Fields inherited from interface com.jalios.jcms.DataController |
---|
CTXT_DOC_DIRECTORY, CTXT_DOC_UNZIP, CTXT_DOC_UPLOAD, CTXT_FORCE_DELETE, CTXT_IGNORE_INTEGRITY_CHECK, CTXT_ORIGINAL_DATA, CTXT_REST, CTXT_WEBDAV, DO_NOT_STORE |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
BasicDataController()
Constructs a BasicDataController with order = 0 |
|
BasicDataController(int order)
Constructs a BasicDataController with the given order |
Method Summary | |
---|---|
void |
afterWrite(Data data,
int op,
Member mbr,
Map context)
This method is called once the write operation has been performed. |
void |
beforeWrite(Data data,
int op,
Member mbr,
Map context)
This method is called before the write operation is performed. |
ControllerStatus |
checkIntegrity(Data data)
Checks if the given data respects constraints integrity |
ControllerStatus |
checkWrite(Data data,
int op,
Member mbr,
boolean checkIntegrity,
Map context)
Checks if the given write operation can be performed |
int |
compareTo(Object obj)
Compare this object with the specified object for order. |
boolean |
equals(Object obj)
Indicates wheter some other object is "equal to" this one. |
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected int order
Constructor Detail |
---|
public BasicDataController()
public BasicDataController(int order)
order
- the orderMethod Detail |
---|
public boolean init(Plugin plugin)
PluginComponent
init
in interface PluginComponent
plugin
- the calling plugin
PluginComponent.init(Plugin)
public ControllerStatus checkIntegrity(Data data)
checkIntegrity
in interface DataController
data
- the data to be checked
public ControllerStatus checkWrite(Data data, int op, Member mbr, boolean checkIntegrity, Map context)
checkWrite
in interface DataController
data
- the data involved by this operationop
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcheckIntegrity
- if true, requires the constraints integrity to be checkedcontext
- a map which contains context parameters (may be null)
public void beforeWrite(Data data, int op, Member mbr, Map context)
beforeWrite
in interface DataController
data
- the data which will be writtenop
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public void afterWrite(Data data, int op, Member mbr, Map context)
afterWrite
in interface DataController
data
- the data which will be writtenop
- the operation (OP_CREATE, OP_UPDATE, ...)mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public int compareTo(Object obj)
compareTo
in interface Comparable
obj
- the Object to be compared.Comparable.compareTo(java.lang.Object)
public boolean equals(Object obj)
equals
in class Object
obj
- the Object to be compared.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |