Examples of RegistrationException


Examples of com.sun.enterprise.registration.RegistrationException

    }

    public ServiceTag.RegistrationStatus getRegistrationStatus(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
            throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
        }
        return ServiceTag.RegistrationStatus.valueOf(getSubElementValue(st, ServiceTag.REGISTRATION_STATUS));
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

    }

    public void setStatus(ServiceTag serviceTag, ServiceTag.Status status) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
            throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
        }
        setSubElementValue(st, ServiceTag.STATUS, status.toString());
        writeToFile();
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

    }

    public ServiceTag.Status getStatus(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
            throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
        }
        return ServiceTag.Status.valueOf(getSubElementValue(st, ServiceTag.STATUS));
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

     */
    void write(Node node, OutputStream stream) throws RegistrationException {
        try {
            transformer.transform(new DOMSource(node), new StreamResult(stream));
        } catch (Exception e) {
            throw new RegistrationException(e);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

                Element element = document.createElement(subElementName);
                element.setTextContent(value);
                rootElement.appendChild(element);       
            }
            else {           
                throw new RegistrationException(StringManager.getString("rpmgr.noSuchElement"));
            }
        }
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

            if (registrationFile.exists()) {
                try {
                    document = documentBuilder.parse(registrationFile);
                    registryElement = findRegistryElement();
                } catch (Exception e) {
                    throw new RegistrationException(e);
                }
            }
            else {
                document = documentBuilder.newDocument();
                registryElement = document.createElement(REGISTRY_TAG);
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

        OutputStream os = null;
        try {
            os = new FileOutputStream(registrationFile);
            write(os);
        } catch (Exception e) {
            throw new RegistrationException(e);
        } finally {
            if (os != null) {
                try {
                    os.close();
                } catch (IOException ex) {
                    throw new RegistrationException(StringManager.getString("rpmgr.errClosingRepos"), ex);
                }
            }
        }
    }
View Full Code Here

Examples of com.volantis.synergetics.directory.monitor.RegistrationException

                                  boolean persistentTimestamps,
                                  boolean recursive)
        throws RegistrationException {

        if (!dir.exists()) {
            throw new RegistrationException("directory-does-not-exist", dir);
        }
        if (dir.isFile()) {
            throw new RegistrationException("file-is-not-directory", dir);
        }
        if (!dir.canWrite()) {
            throw new RegistrationException("directory-is-not-writable", dir);
        }
        String dirName = null;
        try {
            // get the canonical path to avoid duplicates. Note we store
            // String path names rather then files to avoid issues with
            // renames/state changes in File objects
            dirName = dir.getCanonicalPath();
        } catch (IOException e) {
            throw new RegistrationException(e);
        }

        TimestampPersistenceFactory tpf = null;
        if (persistentTimestamps) {
            tpf = new OnDiskTimestampPersistenceFactory();
View Full Code Here

Examples of com.volantis.synergetics.directory.monitor.RegistrationException

                  String canonicalDirPath,
                  DirectoryMonitorCallback callback,
                  TimestampPersistenceFactory persistenceFactory,
                  boolean recursive) throws RegistrationException {
        if (null == callback) {
            throw new RegistrationException("argument-must-not-be",
                                            new Object[]{"callback", "null"});
        }
        synchronized(lock) {
            boolean found = isRegistered(canonicalDirPath);

            // we didn't find the filename so we can add it
            if (found) {
                throw new RegistrationException(
                    "directory-already-registered", canonicalDirPath);
            } else {
                final MonitoredDirectoryInfo mdi = new MonitoredDirectoryInfo(
                        canonicalDirPath, bundleId, callback,
                        persistenceFactory, recursive);
View Full Code Here

Examples of it.unipd.netmus.shared.exception.RegistrationException

        // create new user in the database
        try {
            new UserAccount(login.getUser(), passwordHash);
        } catch (Exception e) {
            throw new RegistrationException();
        }

        return login;

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.