Package uk.ac.bbsrc.tgac.miso.core.service.printing.schema

Examples of uk.ac.bbsrc.tgac.miso.core.service.printing.schema.BarcodableSchema


      ServiceLoader<BarcodableSchema> consumerLoader = ServiceLoader.load(BarcodableSchema.class);
      Iterator<BarcodableSchema> consumerIterator = consumerLoader.iterator();

      contextMap = new HashMap<String, BarcodableSchema>();
      while (consumerIterator.hasNext()) {
        BarcodableSchema p = consumerIterator.next();

        if (!contextMap.containsKey(p.getName())) {
          contextMap.put(p.getName(), p);
        }
        else {
          if (contextMap.get(p.getName()) != p) {
            String msg = "Multiple different BarcodableSchemas with the same schema name " +
                         "('" + p.getName() + "') are present on the classpath. Schema names must be unique.";
            log.error(msg);
            throw new ServiceConfigurationError(msg);
          }
        }
      }
View Full Code Here


    return JSONUtils.SimpleJSONError("Cannot check printer availability");
  }

  public JSONObject addPrintService(HttpSession session, JSONObject json) {
    try {
      BarcodableSchema barcodableSchema = printManager.getBarcodableSchema(json.getString("schema"));
      MisoPrintService printService = new DefaultPrintService();
      if ("Custom".equals(json.getString("serviceFor"))) {
        printService = new CustomPrintService();
      }
      printService.setName(json.getString("serviceName"));
View Full Code Here

    public MisoPrintService mapRow(ResultSet rs, int rowNum) throws SQLException {
      try {
        MisoPrintService printService;

        PrintContext pc = printManager.getPrintContext(rs.getString("contextName"));
        BarcodableSchema barcodableSchema = printManager.getBarcodableSchema(rs.getString("printSchema"));
        if (barcodableSchema !=null){
        barcodableSchema.getBarcodeLabelFactory().setFilesManager(misoFilesManager);
        barcodableSchema.getBarcodeLabelFactory().setSecurityManager(securityManager);
        }

        if ("net.sf.json.JSONObject".equals(rs.getString("printServiceFor"))) {
          printService = new CustomPrintService();
          printService.setBarcodableSchema(barcodableSchema);
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.service.printing.schema.BarcodableSchema

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.