Package com.sun.enterprise.registration

Examples of com.sun.enterprise.registration.RegistrationException


   
    public void generateRegistrationPage(String outputFile, Locale locale) throws Exception {
        bundle = getResourceBundle(locale);
        InputStream is = getClass().getClassLoader().getResourceAsStream(TEMPLATE_FILE);
        if (is == null)
            throw new RegistrationException("Template file [" + TEMPLATE_FILE + "] not found");

        List<ServiceTag> serviceTags = rm.getServiceTags();
        StringBuilder productName = new StringBuilder();
        for (ServiceTag tag : serviceTags) {
            if (productName.length() > 0)
View Full Code Here


   
    public void generateRegistrationPage(String outputFile, Locale locale) throws Exception {
        bundle = getResourceBundle(locale);
        InputStream is = getClass().getClassLoader().getResourceAsStream(TEMPLATE_FILE);
        if (is == null)
            throw new RegistrationException("Template file [" + TEMPLATE_FILE + "] not found");

        List<ServiceTag> serviceTags = rm.getServiceTags();
        StringBuilder productName = new StringBuilder();
        for (ServiceTag tag : serviceTags) {
            if (productName.length() > 0)
View Full Code Here

            }
            result = unTransferredTags.size();
            logger.info( result + " service tags successfully transferred to SysNet");
            return result;
        } catch (Exception e) {
            throw new RegistrationException(StringManager.getString("xfmgr.errTransTags"), e);
}
    }
View Full Code Here

             * interrupted for some reason.  So make sure the command process exit
             * was actually detected before trying to interpret the status.
             */
            if ( ! processExitDetected.get()) {
                logger.fine("Command process monitoring thread stopped before the command process, so the command's state is unknown");
                throw new RegistrationException(StringManager.getString("xfmgr.unknownCmdProcResult"));
            }

            /*
             * By checking processExited first, we know that at this point the
             * processExitStatus has meaning.  So go ahead and check it to
             * decide if the process completed successfully or not.
             */
            if (processExitStatus.get() != 0) {
                /*
                 * Build an exception using the error output from the process
                 * and throw it.
                 */
                RegistrationException e =
                    new RegistrationException(StringManager.getString("xfmgr.cmdProcFailed", errorTextFromProcess.toString()));
                throw e;
            }

            logger.fine("Command process seems to have completed successfully");
        }
View Full Code Here

         * @param the option to be added
         * @param value the option's value
         */
        private void addRequired(String option, String value) throws RegistrationException {
            if (value == null) {
                throw new RegistrationException(StringManager.getString("xfmgr.reqdValueNull", option));
            }
            command.add(option);
            command.add(formatValue(value));
        }
View Full Code Here

            transformer = transformerFactory.newTransformer();
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount","4");
            loadOrCreateDocument();
        } catch (Exception e) {
            throw new RegistrationException(e);
        }
    }
View Full Code Here

     * to the local repository
     */
    public void add(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st != null) {
            throw new RegistrationException(StringManager.getString("rpmgr.svrTagExists"));
            //throw new RegistrationException("rpmgr.svrTagExists");
        }
        /*
         * Create a new Element in the active document using the specified
         * service tag information.
View Full Code Here

     * to the local repository
     */
    public void remove(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
         throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
         //throw new RegistrationException("rpmgr.noSuchSrvTag");
        }
        registryElement.removeChild(st);
        writeToFile();
    }
View Full Code Here

     * to the local repository
     */
    public void setRegistrationStatus(ServiceTag serviceTag, ServiceTag.RegistrationStatus status) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
            throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
        }
        setSubElementValue(st, ServiceTag.REGISTRATION_STATUS, status.toString());
        writeToFile();
    }
View Full Code Here

    }

    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

TOP

Related Classes of com.sun.enterprise.registration.RegistrationException

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.