Package eu.scape_project.planning.services.action

Examples of eu.scape_project.planning.services.action.IPreservationActionRegistry


        try {
            Class serviceLocatorClass = Class.forName(registry.getType());

            Object serviceLocator = serviceLocatorClass.newInstance();
            if (serviceLocator instanceof IPreservationActionRegistry) {
                IPreservationActionRegistry locator = null;
                locator = (IPreservationActionRegistry) serviceLocator;

                locator.connect(registry.getUrl());
                return locator;
            } else
                throw new IllegalArgumentException("schema  " + registry.getType()
                    + " is not a IPreservationActionRegistry.");
        } catch (IllegalArgumentException e) {
View Full Code Here


     *             if the registry is not properly configured
     */
    public List<IServiceInfo> queryRegistry(FormatInfo formatInfo, PreservationActionRegistryDefinition registry)
        throws PlatoException {
        log.debug("Loading preservation action services from registry [{}]", registry.getShortname());
        IPreservationActionRegistry serviceLocator = null;

        try {
            serviceLocator = PreservationActionRegistryFactory.getInstance(registry);
        } catch (IllegalArgumentException e1) {
            throw new PlatoException("Registry:  " + registry.getShortname()
                + " has changed and needs to be reconfigured.");
        }

        if (serviceLocator == null) {
            throw new PlatoException("Failed to access " + registry.getShortname());
        }

        return serviceLocator.getAvailableActions(formatInfo);
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.services.action.IPreservationActionRegistry

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.