|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.builders.AbstractServletBuilder
Some builders are associated with a servlet. Think of images and attachments. There is some common functionality for those kind of builders, which is collected here.
| Field Summary | |
protected int |
addsFileName
-2: check init, based on existance of filename field. |
static String |
FIELD_FILENAME
|
static String |
FIELD_HANDLE
|
static String |
FIELD_MIMETYPE
|
static Parameter[] |
FORMAT_PARAMETERS
|
static Parameter[] |
GUI_PARAMETERS
Can be used to construct a List for executeFunction argument (new Parameters(GUI_ARGUMENTS)) |
protected static Pattern |
legalizeFileName
|
static Parameter[] |
MIMETYPE_PARAMETERS
|
protected boolean |
usesBridgeServlet
If this builder is association with a bridge servlet. |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, guiFunction, infoFunction, internalVersion, nodeCache, oType, searchAge, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions |
| Constructor Summary | |
AbstractServletBuilder()
|
|
| Method Summary | |
protected boolean |
addFileName(MMObjectNode node,
String servlet)
|
protected void |
checkHandle(MMObjectNode node)
Tries to fill all fields which are dependend on the 'handle' field. |
boolean |
commit(MMObjectNode node)
Commit changes to this node to the storage layer. |
protected Object |
executeFunction(MMObjectNode node,
String function,
List args)
Overrides the executeFunction of MMObjectBuilder with a function to get the servletpath associated with this builder. |
protected abstract String |
getAssociation()
This functions should return a string identifying where it is for. |
protected String |
getDefaultFileName()
|
protected abstract String |
getDefaultPath()
If no servlet path can be found via the association (if the servlet did not 'associate' itself with something, like servdb), then the getServletPath function will fall back to this. |
protected StringBuffer |
getFileName(MMObjectNode node,
StringBuffer buf)
|
protected String |
getGUIIndicator(MMObjectNode node,
Parameters pars)
A complicated default implementation for GUI. |
String |
getGUIIndicator(String field,
MMObjectNode node)
This is final, because getSGUIIndicator has to be overridden in stead |
protected abstract Set |
getHandleFields()
Returns the fields which tell something about the 'handle' field, and can be calculated from it. |
protected String |
getMimeType(MMObjectNode node)
Returns the Mime-type associated with this node |
protected String |
getServletPath()
|
protected String |
getServletPath(String root)
Get a servlet path. |
protected String |
getSession(Parameters a,
int nodeNumber)
|
protected abstract String |
getSGUIIndicator(MMObjectNode node,
Parameters a)
'Servlet' builders need a way to transform security to the servlet, in the gui functions, so they have to implement the 'SGUIIndicators' |
protected String |
getSuperGUIIndicator(String field,
MMObjectNode node)
Gets the GUI indicator of the super class of this class, to avoid circular references in descendants, which will occur if they want to call super.getGUIIndicator(). |
int |
insert(String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String FIELD_MIMETYPE
public static final String FIELD_FILENAME
public static final String FIELD_HANDLE
public static final Parameter[] GUI_PARAMETERS
public static final Parameter[] FORMAT_PARAMETERS
public static final Parameter[] MIMETYPE_PARAMETERS
protected boolean usesBridgeServlet
protected int addsFileName
protected static final Pattern legalizeFileName
| Constructor Detail |
public AbstractServletBuilder()
| Method Detail |
protected abstract String getAssociation()
protected abstract String getDefaultPath()
protected String getServletPath(String root)
root - The path to the application's root.protected String getServletPath()
protected String getMimeType(MMObjectNode node)
protected void checkHandle(MMObjectNode node)
protected abstract Set getHandleFields()
public int insert(String owner,
MMObjectNode node)
MMObjectBuilderMMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
insert in class MMObjectBuilderowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.
int value which is the new object's unique number, -1 if the insert failed.public boolean commit(MMObjectNode node)
MMObjectBuilderMMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).
Use only to commit changes - for adding node, use MMObjectBuilder.insert(int, java.lang.String).
commit in class MMObjectBuildernode - The node to be committed
protected abstract String getSGUIIndicator(MMObjectNode node,
Parameters a)
protected final String getSuperGUIIndicator(String field,
MMObjectNode node)
protected final String getGUIIndicator(MMObjectNode node,
Parameters pars)
MMObjectBuilder
getGUIIndicator in class MMObjectBuilder
public final String getGUIIndicator(String field,
MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - The node to displayfield - the name field of the field to display
String, null if not specifiedprotected String getDefaultFileName()
protected StringBuffer getFileName(MMObjectNode node,
StringBuffer buf)
protected boolean addFileName(MMObjectNode node,
String servlet)
protected String getSession(Parameters a,
int nodeNumber)
protected Object executeFunction(MMObjectNode node,
String function,
List args)
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||