|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.applications.editwizard.Wizard
EditWizard
| Constructor Summary | |
Wizard(java.lang.String context,
URIResolver uri,
Config.WizardConfig wizardConfig,
Cloud cloud)
Constructor. |
|
Wizard(java.lang.String context,
URIResolver uri,
java.lang.String wizardname,
java.lang.String dataid,
Cloud cloud)
Deprecated. use Wizard(String, URIResolver, Config.WizardConfig, Cloud) |
|
| Method Summary | |
void |
addBinaryData(org.w3c.dom.Node fieldnode)
This method stores binary data in the data, so that the information can be used by the html. |
protected boolean |
checkNode(java.lang.String objectNumber,
java.lang.String operation)
Returns true if the specified operation is valid for the node with the specified objectnumber. |
boolean |
committed()
Returns whether the wizard may be closed |
org.w3c.dom.Document |
createPreHtml(org.w3c.dom.Node wizardSchema,
java.lang.String formid,
org.w3c.dom.Node data,
java.lang.String instanceName)
This method generated the pre-html. |
org.w3c.dom.Document |
createPreHtml(java.lang.String instanceName)
This method generates the pre-html. |
void |
createPreHtmlForm(org.w3c.dom.Node form,
org.w3c.dom.Node formdef,
org.w3c.dom.Node data)
This method is used by the #createPreHtml method to generate a pre-html form. |
java.lang.String |
determineNextForm(java.lang.String direction)
This method is used to determine what form is the sequential next, previous, first etc. |
byte[] |
getBinary(java.lang.String did)
This method allows you to retrieve the data of a temporarily stored binary. |
java.lang.String |
getBinaryName(java.lang.String did)
With this method you can retrieve the binaryname of a placed binary. |
java.lang.String |
getBinaryPath(java.lang.String did)
With this method you can retrieve the binarypath of a placed binary. |
int |
getByteSize()
Determins the byte-size of this object |
int |
getByteSize(SizeOf sizeof)
Determins the byte-size of this object using the given SizeOf instance. |
org.w3c.dom.Node |
getConstraints(java.lang.String objecttype)
This method gets the MMBase constraints. |
org.w3c.dom.Node |
getConstraints(java.lang.String objecttype,
java.lang.String fieldname)
This method gets the MMBase constraints. |
org.w3c.dom.Document |
getData()
|
java.lang.String |
getDataId()
|
java.lang.String |
getObjectNumber()
|
org.w3c.dom.Document |
getPreForm()
|
org.w3c.dom.Document |
getPreForm(java.lang.String instanceName)
|
org.w3c.dom.Document |
getSchema()
|
WizardCommand |
getStartWizardCommand()
Returns the subwizard start command |
protected void |
loadWizard(Config.WizardConfig wizardConfig)
Loads the wizard schema, and a work document, and fills it with initial data. |
boolean |
mayBeClosed()
Returns whether the wizard may be closed |
protected boolean |
mayDeleteNode(java.lang.String objectNumber)
Returns true if the node with the specified objectnumber can be deleted |
protected boolean |
mayEditNode(java.lang.String objectNumber)
Returns true if the node with the specified objectnumber can be edited |
void |
mergeConstraints(org.w3c.dom.Node fieldDef,
org.w3c.dom.Node fieldNode)
This method is used to merge MMBase specific constraints with the values placed in the Wizard definition. |
void |
processCommand(WizardCommand cmd)
This method is usually called by #processCommands and processes one command. |
void |
processRequest(javax.servlet.ServletRequest req)
Processes an incoming request (usually passed on by a jsp code). |
void |
setBinary(java.lang.String did,
byte[] data,
java.lang.String name,
java.lang.String path)
With this method you can store a binary in the wizard. |
void |
setReferrer(java.lang.String s)
|
void |
setSessionId(java.lang.String s)
|
void |
setSessionKey(java.lang.String s)
|
void |
setTemplatesDir(java.lang.String f)
|
boolean |
startWizard()
Returns whether a sub wizard should be started |
protected void |
storeConfigurationAttributes(Config.WizardConfig wizardConfig)
Stores configuration variables as attributes in the variabless set. |
void |
writeHtmlForm(java.io.Writer out,
java.lang.String instanceName)
Constructs and writes final form-html to the given out writer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Wizard(java.lang.String context,
URIResolver uri,
java.lang.String wizardname,
java.lang.String dataid,
Cloud cloud)
throws WizardException
context - the editwizard context pathuri - the URIResolver with which the wizard schema's and the xsl's will be loadedwizardname - name of teh wizarddataid - the objectnumbercloud - the Cloud to use
public Wizard(java.lang.String context,
URIResolver uri,
Config.WizardConfig wizardConfig,
Cloud cloud)
throws WizardException
context - the editwizard context pathuri - the URIResolver with which the wizard schema's and the xsl's will be loadedwizardConfig - the class containing the configuration parameters (i.e. wizard name and objectnumber)cloud - the Cloud to use| Method Detail |
public int getByteSize()
SizeMeasurablegetByteSize in interface SizeMeasurablepublic int getByteSize(SizeOf sizeof)
SizeMeasurablegetByteSize in interface SizeMeasurablepublic void setSessionId(java.lang.String s)
public void setSessionKey(java.lang.String s)
public void setReferrer(java.lang.String s)
public void setTemplatesDir(java.lang.String f)
public java.lang.String getObjectNumber()
public java.lang.String getDataId()
public org.w3c.dom.Document getData()
public org.w3c.dom.Document getSchema()
public org.w3c.dom.Document getPreForm()
throws WizardException
public org.w3c.dom.Document getPreForm(java.lang.String instanceName)
throws WizardException
public boolean committed()
public boolean mayBeClosed()
public boolean startWizard()
protected boolean checkNode(java.lang.String objectNumber,
java.lang.String operation)
throws WizardException
objectNumber - teh number of teh ndoe to checkoperation - a valid operation, i.e. maywrite or maydeleteWizardException - if the object cannot be retrieved
protected boolean mayEditNode(java.lang.String objectNumber)
throws WizardException
objectNumber - number of the object to checkWizardException - if the object cannot be retrieved
protected boolean mayDeleteNode(java.lang.String objectNumber)
throws WizardException
objectNumber - number of the object to checkWizardException - if the object cannot be retrievedpublic WizardCommand getStartWizardCommand()
protected void storeConfigurationAttributes(Config.WizardConfig wizardConfig)
wizardConfig - the config with the parameters
protected void loadWizard(Config.WizardConfig wizardConfig)
throws WizardException
wizardConfig - the class containing the configuration parameters (i.e. wizard name and objectnumber)
public void processRequest(javax.servlet.ServletRequest req)
throws WizardException
req - the ServletRequest contains the name-value pairs received through the http connection
public void writeHtmlForm(java.io.Writer out,
java.lang.String instanceName)
throws WizardException,
javax.xml.transform.TransformerException
out - The writer where the output (html) should be written to.instancename - name of the current instancepublic java.lang.String determineNextForm(java.lang.String direction)
direction - indicates what you wanna know. Possibilities:
- first (default)
- last
- previous
- next
public org.w3c.dom.Document createPreHtml(java.lang.String instanceName)
throws WizardException
createPreHtml(java.lang.String)
public org.w3c.dom.Document createPreHtml(org.w3c.dom.Node wizardSchema,
java.lang.String formid,
org.w3c.dom.Node data,
java.lang.String instanceName)
throws WizardException
wizardSchema - the main node of the schema to be used. Includes should already be resolved.formid - The id of the current formdata - The main node of the data tree to be usedinstancename - The instancename of this wizard
public void createPreHtmlForm(org.w3c.dom.Node form,
org.w3c.dom.Node formdef,
org.w3c.dom.Node data)
throws WizardException
form - The node of the pre-html form which is to be generatedformdef - the node of the wizardschema form definitiondata - Points to the datacontext node which should be used for this form.
public void processCommand(WizardCommand cmd)
throws WizardException
cmd - The command to be processed
public void setBinary(java.lang.String did,
byte[] data,
java.lang.String name,
java.lang.String path)
did - This is the dataid what points to in what field the binary should be stored, once commited.data - This is a bytearray with the data to be stored.name - This is the name which will be used to show what file is uploaded.path - The (local) path of the file placed.public byte[] getBinary(java.lang.String did)
did - The dataid of the binary you want.public java.lang.String getBinaryName(java.lang.String did)
did - The dataid of the binary you want.public java.lang.String getBinaryPath(java.lang.String did)
did - The dataid of the binary you want.public void addBinaryData(org.w3c.dom.Node fieldnode)
fieldnode - the fieldnode where the binary data information should be stored.
public void mergeConstraints(org.w3c.dom.Node fieldDef,
org.w3c.dom.Node fieldNode)
fieldDef - the fielddefinition as placed in the wizardschema (==definition)fieldNode - The fieldnode points to the datanode. (This is needed to find out what datatype this field is about).public org.w3c.dom.Node getConstraints(java.lang.String objecttype)
objecttype - The name of the object, eg. images, jumpers, urls, news
public org.w3c.dom.Node getConstraints(java.lang.String objecttype,
java.lang.String fieldname)
objecttype - The name of the object, eg. images, jumpers, urls, newsfieldname - The name of the field, eg. title, body, start
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||