Package de.metalcon.server.tomcat.NSSP.create.statusupdate

Examples of de.metalcon.server.tomcat.NSSP.create.statusupdate.CreateStatusUpdateResponse


          }
          break;

        // create a status update
        default:
          final CreateStatusUpdateResponse createStatusUpdateResponse = new CreateStatusUpdateResponse();
          final CreateStatusUpdateRequest createStatusUpdateRequest = CreateStatusUpdateRequest
              .checkRequest(formItemList, createRequest,
                  createStatusUpdateResponse);
          createResponse = createStatusUpdateResponse;

          if (createStatusUpdateRequest != null) {
            try {
              this.writeFiles(createStatusUpdateRequest
                  .getStatusUpdateTemplate(), formItemList);

              // create a new status update of the type specified
              final StatusUpdate statusUpdate = StatusUpdateManager
                  .instantiateStatusUpdate(
                      createStatusUpdateRequest
                          .getStatusUpdateTemplate()
                          .getName(), formItemList);
              statusUpdate.setId(createStatusUpdateRequest
                  .getStatusUpdateId());
              createStatusUpdateRequest
                  .setStatusUpdate(statusUpdate);

              // create status update
              final CreateStatusUpdate createStatusUpdateCommand = new CreateStatusUpdate(
                  this, createStatusUpdateResponse,
                  createStatusUpdateRequest);
              this.commandQueue.add(createStatusUpdateCommand);

              commandStacked = true;
            } catch (final StatusUpdateInstantiationFailedException e) {
              // remove the files
              FormFile fileItem;
              File file;
              for (String fileIdentifier : formItemList
                  .getFileIdentifiers()) {
                fileItem = formItemList.getFile(fileIdentifier);
                file = fileItem.getFile();

                if (file != null) {
                  file.delete();
                }
              }

              createStatusUpdateResponse
                  .statusUpdateInstantiationFailed(e
                      .getMessage());
            } catch (final Exception e) {
              responder.error(500,
                  "errors encountered while writing files");
View Full Code Here


      formItemList
          .addField(
              ProtocolConstants.Parameters.Create.StatusUpdate.STATUS_UPDATE_TYPE,
              statusUpdateType);

      final CreateStatusUpdateResponse createStatusUpdateResponse = new CreateStatusUpdateResponse();
      this.createStatusUpdateRequest = CreateStatusUpdateRequest
          .checkRequest(formItemList, createRequest,
              createStatusUpdateResponse);
      this.jsonResponse = extractJson(createStatusUpdateResponse);
    }
View Full Code Here

TOP

Related Classes of de.metalcon.server.tomcat.NSSP.create.statusupdate.CreateStatusUpdateResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.