예제 #1
0
 @Override
 protected void initialiseHandler(BeanFactory factory) {
   setServices((ServiceRegistry) factory.getBean(ServiceRegistry.SERVICE_REGISTRY));
   fillContent = new FillContent();
   fillContent.setServiceRegistry(services);
   fillPdf = new FillPDF();
   fillPdf.setServiceRegistry(services);
   AlfrescoStructure.setServiceRegistry(services);
 }
예제 #2
0
 private void executeActionScript(String actionValue, Map<String, String> commands)
     throws ValueActionException, DuplicateInputPdfException, MissingInputPdfKeyException,
         IOException, NoPdfFileException, DuplicateOutputContentException,
         MissingOutputContentException, NoContentException, InvalidValueOfParameterException,
         AttributeContentException, InvalidAssociationException, OutputTypeKeyException,
         InvalidContentException, MissingOutputPathForPDFException, DocumentException,
         MissingOverridePdfKeyException, FileExistsException, FileNotFoundException,
         MissingDateFormatException, InvalidNodeRefException, ParseException,
         InvalidFormatParameterException {
   if (actionValue.equals(ConstantsLanguage.ACTION_VALUES[0])) {
     fillContent.execute(commands);
   } else if (actionValue.equals(ConstantsLanguage.ACTION_VALUES[1])) {
     fillPdf.execute(commands);
   } else {
     throw new ValueActionException(ValueActionException.BAD_FORMAT);
   }
 }
예제 #3
0
 public void execute(ExecutionContext executionContext) {
   fillPdf.setExecutionContext(executionContext);
   Map<String, String> commands = null;
   try {
     commands = getScriptAsKeysValues();
   } catch (EmptyScriptException e) {
     logger.error("Error :", e);
   }
   String actionValue = null;
   try {
     actionValue = getAction(commands);
   } catch (EmptyKeyActionException e) {
     logger.error("Error :", e);
   }
   try {
     executeActionScript(actionValue, commands);
   } catch (ValueActionException e) {
     logger.error("Error :", e);
   } catch (DuplicateInputPdfException e) {
     logger.error("Error :", e);
   } catch (MissingInputPdfKeyException e) {
     logger.error("Error :", e);
   } catch (IOException e) {
     logger.error("Error :", e);
   } catch (NoPdfFileException e) {
     logger.error("Error :", e);
   } catch (DuplicateOutputContentException e) {
     logger.error("Error :", e);
   } catch (MissingOutputContentException e) {
     logger.error("Error :", e);
   } catch (NoContentException e) {
     logger.error("Error :", e);
   } catch (InvalidValueOfParameterException e) {
     logger.error("Error :", e);
   } catch (AttributeContentException e) {
     logger.error("Error :", e);
   } catch (InvalidAssociationException e) {
     logger.error("Error :", e);
   } catch (OutputTypeKeyException e) {
     logger.error("Error :", e);
   } catch (InvalidContentException e) {
     logger.error("Error :", e);
   } catch (MissingOutputPathForPDFException e) {
     logger.error("Error :", e);
   } catch (DocumentException e) {
     logger.error("Error :", e);
   } catch (MissingOverridePdfKeyException e) {
     logger.error("Error :", e);
   } catch (FileExistsException e) {
     logger.error("Error :", e);
   } catch (FileNotFoundException e) {
     logger.error("Error :", e);
   } catch (MissingDateFormatException e) {
     logger.error("Error :", e);
   } catch (ParseException e) {
     logger.error("Error :", e);
   } catch (InvalidFormatParameterException e) {
     logger.error("Error :", e);
   } catch (InvalidNodeRefException e) {
     logger.error("Error :", e);
   }
 }