// result from
// HTTP POST request. The class RequestType currently does not
// distinguish these
// requests further, thus it has to be done here.
if (request.type().isAction()) {
RequestParameterAction action = RequestParameter
.actionParameter(request.parameters().get(
RequestParameter.ParameterAction));
if (action.actionAnnotate()) {
RequestParameter parameter = request.parameters().get(
RequestParameter.ActionValueAnnotation);
if (parameter.hasValue()) {
if (!parameter.value().trim().equals("")) {
database().annotate(
request.wri().resourceIdentifier(),
new Annotation(parameter.value(),
new SimpleDateFormat(
"d MMM yyyy HH:mm:ss")
.format(new Date()), request
.user()));
}
}
// Only objects may be annotated, thus this is a get request
isGetRequest = true;
} else if (action.actionSchemaNode()) {
GroupSchemaNode parent = null;
if (!request.isRootRequest()) {
parent = (GroupSchemaNode) ((DatabaseElementNode) _database
.get(request.wri().resourceIdentifier())).schema();
}
_database.insertSchemaNode(
parent,
request.parameters().get(ParameterSchemaNodeName)
.value(),
Byte.parseByte(request.parameters()
.get(ParameterSchemaNodeType).value()),
request.user());
isGetRequest = !request.isRootRequest();
isIndexRequest = !isGetRequest;
} else if (action.actionInsert()) {
DocumentNode insertNode = this.getInsertNode(request);
page = new RedirectPage(request, database().insertNode(
request.wri().resourceIdentifier(), insertNode,
request.user()));
} else if (action.actionUpdate()) {
if (request.parameters().hasParameter(ParameterDatabaseID)) {
// Updating a configuration file
this.updateConfigurationFile(request);
// Configuration files may be modified either while viewing
// the