Examples of ITicketManager


Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

    params.put("numeroIndirizzo", ticket.getNumeroIndirizzo());
    params.put("telefono", ticket.getTelefono());
    params.put("email", ticket.getEmail());
    params.put("message", ticket.getMessage());
   
    ITicketManager ticketManager = this.getTicketManager();
    String userInterventionTypeDescr = null;
    if (ticket.getUserInterventionType()>0) {
      InterventionType userInterventionType = ticketManager.getInterventionType(ticket.getUserInterventionType());
      if (null!=userInterventionType) {
        userInterventionTypeDescr = userInterventionType.getDescr();
      }
    }
    if (null==userInterventionTypeDescr) {
      userInterventionTypeDescr = "Generico";
    }
    params.put("userInterventionType", userInterventionTypeDescr);
   
    String assignedInterventionTypeDescr = null;
    if (ticket.getOpInterventionType()>0) {
      InterventionType opInterventionType = ticketManager.getInterventionType(ticket.getOpInterventionType());
      if (null!=opInterventionType) {
        assignedInterventionTypeDescr = opInterventionType.getDescr();
      }
    }
    if (null==assignedInterventionTypeDescr) {
      assignedInterventionTypeDescr = "Generico";
    }
    params.put("assignedInterventionType", assignedInterventionTypeDescr);
   
    String priority = ticketManager.getPriorities().get(ticket.getPriority());
    if (priority==null) priority = "Normale";
    params.put("priority", priority);
   
    Date closingDate = ticket.getClosingDate();
    if (closingDate!=null) {
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

  protected abstract boolean isAccessAllowed(Ticket ticket);
 
  public String view() {
    try {
      String code = this.getCode();
      ITicketManager ticketManager = this.getTicketManager();
      Ticket ticket = ticketManager.getTicket(code);
      if (ticket!=null && this.isAccessAllowed(ticket)) {
        this.setTicket(ticket);
        List<TicketOperation> ticketOperations = ticketManager.getTicketOperations(code);
        this.setTicketOperations(ticketOperations);
      } else {
        this.addActionError(this.getText("Errors.ticketOperation.ticketNotFound"));
        return "ticketNotFound";
      }
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

  }
 
  protected String entryOperation(int operationCode) {
    try {
      String code = this.getCode();
      ITicketManager ticketManager = this.getTicketManager();
      Ticket ticket = ticketManager.getTicket(code);
      if (ticket!=null) {
        this.setTicket(ticket);
        if (this.isOperationAllowed(ticket, operationCode)) {
          List<TicketOperation> ticketOperations = ticketManager.getTicketOperations(code);
          this.setTicketOperations(ticketOperations);
        } else {
          this.addActionError(this.getText("Errors.ticketOperation.notAllowed"));
          return "opNotAllowed";
        }
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

  }
 
  protected String saveOperation(int operationCode) {
    try {
      String code = this.getCode();
      ITicketManager ticketManager = this.getTicketManager();
      Ticket ticket = ticketManager.getTicket(code);
      if (ticket!=null) {
        this.setTicket(ticket);
        boolean allowed = this.isOperationAllowed(ticket, operationCode);
        boolean validated = this.validateParameters(ticket, operationCode, allowed);
        if (!allowed) {
          return "opNotAllowed";
        } else if (!validated) {
          return INPUT;
        } else {
          Ticket newTicket = this.createTicketForUpdate(ticket, operationCode);
          TicketOperation operation = this.createTicketOperation(operationCode);
          ticketManager.updateTicketWithOperation(newTicket, operation);
          this.addActionMessage(this.getText("Message.ticketOperation.completed"));
        }
      } else {
        this.addActionError(this.getText("Errors.ticketOperation.ticketNotFound"));
        return "ticketNotFound";
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

    return newTicket;
  }
 
  protected boolean validateUpdateParams() {
    boolean allowed = true;
    ITicketManager ticketManager = this.getTicketManager();
    Integer interventionType = this.getInterventionType();
    if (null!=interventionType && 0!=interventionType.intValue() && null==ticketManager.getInterventionType(interventionType)) {
      this.addFieldError("interventionType", this.getText("Errors.interventionType.notValid"));
      allowed = false;
    }
    Integer priority = this.getPriority();
    if (null!=priority && 0!=priority.intValue() && null==ticketManager.getPriorities().get(priority)) {
      this.addFieldError("priority", this.getText("Errors.priority.notValid"));
      allowed = false;
    }
    return allowed;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.ITicketManager

  }
 
  @Override
  public void validate() {
    super.validate();
    ITicketManager ticketManager = this.getTicketManager();
    Integer interventionType = this.getInterventionType();
    if (null!=interventionType && 0!=interventionType.intValue() && null==ticketManager.getInterventionType(interventionType)) {
      this.addFieldError("interventionType", this.getText("errors.interventionType.notValid"));
    }
    Boolean trattamentoDati = this.getTrattamentoDati();
    if (null==trattamentoDati || !trattamentoDati.booleanValue()) {
      this.addFieldError("trattamentoDati", this.getText("trattamentoDati.required"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.