Package it.eng.spago.error

Examples of it.eng.spago.error.EMFErrorHandler


   * call the correct jsp reference.
   */

  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {

    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // get the module response
    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse().getAttribute("DetailFunctionalityModule");

    // if the module response is null throws an error and return the name of the errors publisher
    if(moduleResponse==null) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,
                "DetailFunctionalityPublisher",
                "getPublisherName",
                "Module response null");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10 );
      errorHandler.addError(error);
      return new String("error");
    }
   
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        return "detailFunctionality";
      }
    }
   
   
    // if there are some errors into the errorHandler (not validation errors), return the name for the errors publisher
    if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return new String("error");
    }

    Object loop = moduleResponse.getAttribute("loopback");
        if(loop != null) {
View Full Code Here


   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer request,
      ResponseContainer response) {
   
    EMFErrorHandler errorHandler = response.getErrorHandler();
    // get the module response
    SourceBean moduleResponse = (SourceBean)response.getServiceResponse().getAttribute("ListLookupParametersModule");
     
    // if there are some errors into the errorHandler (not validation errors), return the name for the errors publisher
    if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return new String("error");
    }
   
    String publisherName = (String) moduleResponse.getAttribute("PUBLISHER_NAME");
   
View Full Code Here

    static Logger logger = Logger.getLogger(GenericPublisher.class);
   
    protected String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer,SourceBean moduleResponse) {
  logger.debug("IN");
  EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
 
  // if there are some errors (not validation error) into the errorHandler
  // return the name for the errors publisher
  if (!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      if (!GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
    logger.debug("OUT");
    return "error";
      }
  }
 
  // if the module response is null throws an error and return the name of
  // the errors publisher
  if (moduleResponse == null) {
      logger.error("Module response null");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10);
      errorHandler.addError(error);
      logger.debug("OUT");
      return "error";
  }
  // get the value of the publisher name attribute
  String publisherName = (String) moduleResponse.getAttribute(SpagoBIConstants.PUBLISHER_NAME);
  logger.debug("publisherName="+publisherName);
  if (publisherName != null && !publisherName.trim().equals("")) {
      logger.debug("OUT");
      return publisherName;
  } else {
      logger.error("Publisher name attribute not found");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10);
      errorHandler.addError(error);
      logger.debug("OUT");
      return "error";
  }
    }
View Full Code Here

   * @return A string representing the name of the correct publisher, which will
   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {
 
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // get the module response
    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse().getAttribute("DetailMapModule");
   
    // if the module response is null throws an error and return the name of the errors publisher
    if(moduleResponse==null) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,
                "DetailMapPublisher",
                "getPublisherName",
                "Module response null");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10 );
      errorHandler.addError(error);
      return "error";
    }
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        return "detailMap";
      }
    }
   
    // if there are some errors into the errorHandler (not validation errors), return the name for the errors publisher
    if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return new String("error");
    }
 
      Object loop = moduleResponse.getAttribute("loopback");
      if (loop != null) {
View Full Code Here

   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {

    //SourceBean serviceRequest = requestContainer.getServiceRequest();
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
    if (errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      PortletRequest portletRequest = PortletAccess.getPortletRequest();
      PortletMode mode = portletRequest.getPortletMode();
      if (PortletMode.EDIT.equals(mode)) return "saveConfiguration";
      if (PortletMode.HELP.equals(mode)) return "saveConfiguration";
      else return "saveConfigurationLoop";
View Full Code Here

   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {

    //SourceBean serviceRequest = requestContainer.getServiceRequest();
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        return "listMaps";
      }
    }
   
    if (errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR))
      return new String("listMaps");
    else
      return new String("error");
  }
View Full Code Here

   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {

    //SourceBean serviceRequest = requestContainer.getServiceRequest();
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        return "listFeatures";
      }
    }
   
    if (errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR))
      return new String("listFeatures");
    else
      return new String("error");
  }
View Full Code Here

   * @return A string representing the name of the correct publisher, which will
   * call the correct jsp reference.
   */
  public String getPublisherName(RequestContainer requestContainer, ResponseContainer responseContainer) {
 
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
   
    // get the module response
    SourceBean moduleResponse = (SourceBean)responseContainer.getServiceResponse().getAttribute("DetailFeatureModule");
   
    // if the module response is null throws an error and return the name of the errors publisher
    if(moduleResponse==null) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,
                "DetailFeaturePublisher",
                "getPublisherName",
                "Module response null");
      EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 10 );
      errorHandler.addError(error);
      return "error";
    }
   
    // if there are errors and they are only validation errors return the name for the detail publisher
    if(!errorHandler.isOK()) {
      if(GeneralUtilities.isErrorHandlerContainingOnlyValidationError(errorHandler)) {
        return "detailFeature";
      }
    }
   
    // if there are some errors into the errorHandler (not validation errors), return the name for the errors publisher
    if(!errorHandler.isOKBySeverity(EMFErrorSeverity.ERROR)) {
      return new String("error");
    }
 
      Object loop = moduleResponse.getAttribute("loopback");
      if (loop != null) {
View Full Code Here

    SessionContainer spagoPermSession = spagoSession.getPermanentContainer();
    IEngUserProfile profile = (IEngUserProfile)spagoPermSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    ResponseContainer responseContainer = ResponseContainerAccess.getResponseContainer(httpRequest);
    SourceBean serviceRequest = requestContainer.getServiceRequest();
    SourceBean serviceResponse = responseContainer.getServiceResponse();
    EMFErrorHandler errorHandler = responseContainer.getErrorHandler();
    configuration = ConfigSingleton.getInstance();
    StringBuffer htmlStream = new StringBuffer();
    StringBuffer jsStream = new StringBuffer();
    try{
      makeMenu(htmlStream, jsStream, configuration, profile);
View Full Code Here

  private SDKExecutedDocumentContent executeKpi(SDKDocument document, BIObject biobj, String userId,String ouputType){
    logger.debug("IN");
    SDKExecutedDocumentContent toReturn=null;
    SourceBean request = null;
    SourceBean resp = null;
    EMFErrorHandler errorHandler = null;

    try {
      request = new SourceBean("");
      resp = new SourceBean("");
    } catch (SourceBeanException e1) {
      logger.error("Source Bean Exception");
      return null;
    }
    RequestContainer reqContainer = new RequestContainer();
    ResponseContainer resContainer = new ResponseContainer();
    reqContainer.setServiceRequest(request);
    resContainer.setServiceResponse(resp);
    DefaultRequestContext defaultRequestContext = new DefaultRequestContext(
        reqContainer, resContainer);
    resContainer.setErrorHandler(new EMFErrorHandler());
    RequestContainer.setRequestContainer(reqContainer);
    ResponseContainer.setResponseContainer(resContainer);
    SessionContainer session = new SessionContainer(true);
    reqContainer.setSessionContainer(session);
    errorHandler = defaultRequestContext.getErrorHandler();
View Full Code Here

TOP

Related Classes of it.eng.spago.error.EMFErrorHandler

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.