|
||||||||||
| 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 Channel |
channel
|
protected int |
order
|
static String |
REVISION
|
| 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. |
protected ControllerStatus |
checkFieldMLRequired(Publication pub,
String fieldName,
String value,
HashMap valueML)
This convenient method checks if the given multilingual field is required. |
protected ControllerStatus |
checkFieldRequired(Publication pub,
String fieldName,
String value)
This convenient method checks if the given field is required. |
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 |
void |
processFieldStatusMap(Data data,
Member mbr,
Map<String,FieldStatus> map)
This method is called to fill the map of FieldStatus for the given data. |
protected void |
updateFieldStatusMap(Map<String,FieldStatus> map,
String fieldName,
FieldStatus status)
This convient methods update a FieldStatus map with the given status |
| 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
protected Channel channel
| Constructor Detail |
|---|
public BasicDataController()
public BasicDataController(int order)
order - the order| Method Detail |
|---|
public boolean init(Plugin plugin)
PluginComponent
init in interface PluginComponentplugin - the calling plugin
PluginComponent.init(Plugin)public ControllerStatus checkIntegrity(Data data)
checkIntegrity in interface DataControllerdata - the data to be checked
public ControllerStatus checkWrite(Data data,
int op,
Member mbr,
boolean checkIntegrity,
Map context)
checkWrite in interface DataControllerdata - 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 processFieldStatusMap(Data data,
Member mbr,
Map<String,FieldStatus> map)
processFieldStatusMap in interface DataControllerdata - the datambr - the member which requests the datamap - the map of FieldStatus
public void beforeWrite(Data data,
int op,
Member mbr,
Map context)
beforeWrite in interface DataControllerdata - 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 DataControllerdata - 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 Comparableobj - the Object to be compared.Comparable.compareTo(java.lang.Object)public boolean equals(Object obj)
equals in class Objectobj - the Object to be compared.
protected ControllerStatus checkFieldMLRequired(Publication pub,
String fieldName,
String value,
HashMap valueML)
pub - the publicationfieldName - the name of the fieldvalue - the value of the fieldvalueML - the ML value of the field
protected ControllerStatus checkFieldRequired(Publication pub,
String fieldName,
String value)
pub - the publicationfieldName - the name of the fieldvalue - the value of the field
protected void updateFieldStatusMap(Map<String,FieldStatus> map,
String fieldName,
FieldStatus status)
map - the FieldStatus mapfieldName - the name of the field (i.e. the key of the map)status - the FieldStatus to be added
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||