Package com.adito.core

Examples of com.adito.core.CoreException


    @Override
    public void validate(PropertyDefinition definition, String value, Properties properties) throws CodedException {
        super.validate(definition, value, properties);
        if (!isIpAddressExpressionValid(value)) {
            throw new CoreException(ErrorConstants.ERR_STRING_ISNT_IP_ADDRESS, ErrorConstants.CATEGORY_NAME, ErrorConstants.BUNDLE_NAME, null, value);
        }
    }
View Full Code Here


        } else {
            typeMetaInvalid = true;
        }

        if (typeMetaInvalid & typeMetaObjectInvalid) {
            throw new CoreException(ErrorConstants.ERR_BOOLEAN_INVALID_META_DATA,
                ErrorConstants.CATEGORY_NAME,
                ErrorConstants.BUNDLE_NAME,
                null,
                definition.getTypeMeta(),
                null,
                null,
                null);
        }

        if (!trueVal.equals(value) && !falseVal.equals(value)) {
            throw new CoreException(ErrorConstants.ERR_INVALID_BOOLEAN,
                ErrorConstants.CATEGORY_NAME,
                ErrorConstants.BUNDLE_NAME,
                null,
                value,
                trueVal,
View Full Code Here

        parameterValues.put(key, request.getParameter(key));
      }
      return getXML(element, parameterValues, r, des);
    } catch (Exception e) {
      e.printStackTrace();
      throw new CoreException(0, "");
    }

  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.adito.boot.PropertyValidator#validate(com.adito.boot.PropertyDefinition, java.lang.String, java.util.Properties)
   */
  public void validate(PropertyDefinition definition, String value, Properties properties) throws CodedException {
    if (!(new File("/etc/pam.d/" + value).canRead())) {
      throw new CoreException(ErrorConstants.ERR_INTERNAL_ERROR,
          ErrorConstants.CATEGORY_NAME,
          ErrorConstants.BUNDLE_NAME,
          null,
          "<b>"+value+"</b> isn't a valid PAM Service Name. File <b>/etc/pam.d/" + value + "</b> doesn't exist.");
    }
View Full Code Here

        ex = ex.getCause();
      }

      // If this is a code exception we can get the localised messages
      if (exception instanceof CoreException) {
        CoreException ce = (CoreException) exception;
        MessageResources mr = CoreUtil.getMessageResources(request
            .getSession(), ce.getBundle());
        if (mr != null) {
          mesgBuf.append(" ");
          mesgBuf.append(mr.getMessage((Locale) request
              .getSession().getAttribute(Globals.LOCALE_KEY), ce
              .getBundleActionMessage().getKey(), ce
              .getBundleActionMessage().getArg0(), ce
              .getBundleActionMessage().getArg1(), ce
              .getBundleActionMessage().getArg2(), ce
              .getBundleActionMessage().getArg3()));

        }
      }
View Full Code Here

     * If the ticket is a pending VPN session ticket (Agent) then process
     */
    SessionInfo sessionInfo = LogonControllerFactory.getInstance().getAuthorizationTicket(ticket);

    if (sessionInfo == null)
      throw new CoreException(0, "");

    sendFile(new ByteArrayInputStream(cert), cert.length, response);
  }
View Full Code Here

       */
      sessionInfo = LogonControllerFactory.getInstance().getAuthorizationTicket(ticket);
    }

    if (sessionInfo == null)
      throw new CoreException(0, "");

    ExtensionDescriptor app = ExtensionStore.getInstance().getExtensionDescriptor(application);

    if (app == null)
      app = ExtensionStore.getInstance().getAgentApplication();
View Full Code Here

    }

    void stopLocalTunnels(MultiplexedConnection agent, Collection<Tunnel> tunnels) throws CoreException {

        CoreException e = null;

        for (Tunnel tunnel : tunnels) {
            try {
                ByteArrayWriter msg = new ByteArrayWriter();
                msg.writeInt(tunnel.getResourceId());
View Full Code Here

        }
    }

    void stopRemoteTunnels(MultiplexedConnection agent, Collection<Tunnel> tunnels) throws CoreException {

        CoreException e = null;

        for (Tunnel tunnel : tunnels) {
            try {
                RemoteTunnel rt = RemoteTunnelManagerFactory.getInstance().getRemoteTunnel(tunnel.getResourceId());
                if (rt != null) {
View Full Code Here

        return (int) rdr.readInt();
        }
      }

    } catch (Exception e) {
      throw new CoreException(0, "", e);
    }
    return -1;
  }
View Full Code Here

TOP

Related Classes of com.adito.core.CoreException

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.