Package javax.activation

Examples of javax.activation.UnsupportedDataTypeException


        //Создание файлового хранилища
        logger.info("Инициализация хранилища типа {}", new Object[]{storageOptions.getClassName()});
        Class<?> sourceClass = Class.forName(storageOptions.getClassName());
        Object object = sourceClass.newInstance();
        if (!(object instanceof PackageSource)) {
            throw new UnsupportedDataTypeException("Класс " + sourceClass + " не является хранилищем пакетов");
        }
        @SuppressWarnings("unchecked")
        PackageSource<Nupkg> newSource = (PackageSource) object;
        newSource.setName(storageOptions.getStorageName());
        setObjectProperties(storageOptions.getProperties(), object);
View Full Code Here


     */
    protected <T> T createTrigger(TriggerOptions triggerOptions, Class<T> triggerClass) throws Exception {
        logger.info("Создание триггера типа {}", new Object[]{triggerOptions.getClassName()});
        Class<?> sourceClass = Class.forName(triggerOptions.getClassName());
        if (!triggerClass.isAssignableFrom(sourceClass)) {
            throw new UnsupportedDataTypeException("Класс " + sourceClass
                    + " не является " + BeforeTrigger.class.getCanonicalName());
        }
        Object object = sourceClass.newInstance();
        @SuppressWarnings("unchecked")
        T trigger = (T) object;
View Full Code Here

    }

    @Override
    public InputStream getStream() throws IOException {
        if (file == null || !file.exists()) {
            throw new UnsupportedDataTypeException("Не найден файл пакета");
        } else {
            return new FileInputStream(file);
        }
    }
View Full Code Here

      Object vbVal = vb.getValue(getFacesContext());
      if (vbVal instanceof Collection) {
        return (Collection<String>) vbVal;
      } else {
        try {
          throw new UnsupportedDataTypeException("Value is not a Collection");
        } catch (UnsupportedDataTypeException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

      Object vbVal = vb.getValue(getFacesContext());
      if (vbVal instanceof Map) {
        return (Map<String, String>) vbVal;
      } else {
        try {
          throw new UnsupportedDataTypeException("Value is not a map");
        } catch (UnsupportedDataTypeException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
View Full Code Here

        Enum[] enums = enumClass.getEnumConstants();
        for (Enum e : enums) {
          opts.put(e.name(), enumClass.getName() + " " + e.name());
        }
      } else {
        throw new UnsupportedDataTypeException("Value is not an Enum");
      }
    } catch (Throwable t) {
      DominoUtils.handleException(t);
    }
    super.setOptions(opts);
View Full Code Here

     
      if (File.class.equals(resultClass))
        return (Result) new File(string);
    }

    throw new UnsupportedDataTypeException("Could not convert "
        + object.getClass().getName() + " to " + resultClass.getName());
  }
View Full Code Here

TOP

Related Classes of javax.activation.UnsupportedDataTypeException

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.