Package org.dmd.dmc

Examples of org.dmd.dmc.DmcValueException


    protected DenotifyResponseDMO typeCheck(Object value) throws DmcValueException {
        if (value instanceof DenotifyResponseDMO)
            return((DenotifyResponseDMO)value);
       
        throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with DenotifyResponseDMO expected."));
    }
View Full Code Here


        }
        else if (value instanceof Integer){
            rc = ResponseTypeEnum.get((Integer)value);
        }
        else{
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with ResponseTypeEnum expected."));
        }

        if (rc == null){
            throw(new DmcValueException("Value: " + value.toString() + " is not a valid ResponseTypeEnum value."));
        }

        return(rc);
    }
View Full Code Here

        }
        else if (value instanceof Integer){
            rc = ResponseFormatEnum.get((Integer)value);
        }
        else{
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with ResponseFormatEnum expected."));
        }

        if (rc == null){
            throw(new DmcValueException("Value: " + value.toString() + " is not a valid ResponseFormatEnum value."));
        }

        return(rc);
    }
View Full Code Here

  public RequestTypeWithOptions typeCheck(Object value) throws DmcValueException {
    if (value instanceof RequestTypeWithOptions)
      return((RequestTypeWithOptions)value);
    if (value instanceof String)
      return(new RequestTypeWithOptions((String)value));
    throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with RequestTypeWithOptions or String expected."));
  }
View Full Code Here

      String[] opts = remainder.split(" ");
      for(int i=0; i<opts.length; i++){
        if (opts[i].length() > 0){
          RequestOptionEnum val = RequestOptionEnum.get(opts[i]);
          if (val == null)
            throw(new DmcValueException(opts[i] + " is not a valid option."));
          options.add(val);
        }
      }
    }
   
View Full Code Here

  public EditField typeCheck(Object value) throws DmcValueException {
    if (value instanceof EditField)
      return((EditField)value);
    if (value instanceof String)
      return(new EditField((String)value));
    throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with EditField or String expected."));
  }
View Full Code Here

  public EventWithArgs typeCheck(Object value) throws DmcValueException {
    if (value instanceof EventWithArgs)
      return((EventWithArgs)value);
    if (value instanceof String)
      return(new EventWithArgs((String)value));
    throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with EventWithArgs or String expected."));
  }
View Full Code Here

      String[] opts = remainder.split(" ");
      for(int i=0; i<opts.length; i++){
        if (opts[i].length() > 0){
          RequestOptionEnum val = RequestOptionEnum.get(opts[i]);
          if (val == null)
            throw(new DmcValueException(opts[i] + " is not a valid option."));
          options.add(val);
        }
      }
    }
   
View Full Code Here

        else if (value instanceof StringName)
            rc = new ActifactGeneratorREF((StringName)value);
        else if (value instanceof String)
            rc = new ActifactGeneratorREF((String)value);
        else
            throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with ActifactGeneratorREF, ActifactGeneratorDMO or String expected."));

        return(rc);
    }
View Full Code Here

    protected SetResponseDMO typeCheck(Object value) throws DmcValueException {
        if (value instanceof SetResponseDMO)
            return((SetResponseDMO)value);
       
        throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with SetResponseDMO expected."));
    }
View Full Code Here

TOP

Related Classes of org.dmd.dmc.DmcValueException

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.