Package org.gatein.api

Examples of org.gatein.api.EntityAlreadyExistsException


    public void save(DataStorage storage, UserPortalConfigService service) {
        if (create) {
            try {
                PortalConfig existing = storage.getPortalConfig(portalConfig.getType(), portalConfig.getName());
                if (existing != null) throw new EntityAlreadyExistsException("Cannot create site. Site " + id + " already exists.");
            } catch (Exception e) {
                throw new ApiException("Exception occurred checking if site already existed before creating site " + id, e);
            }

            // In order to properly create a site (which includes creating it from a template) it seemed much harder
View Full Code Here


        checkChildrenLoaded();

        Parameters.requireNonNull(childName, "childName");

        if (hasChild(childName)) {
            throw new EntityAlreadyExistsException("child " + childName + " already exists");
        }

        return context.add(null, childName).getNode();
    }
View Full Code Here

        checkChildrenLoaded();

        Parameters.requireNonNull(childName, "childName");

        if (hasChild(childName)) {
            throw new EntityAlreadyExistsException("child " + childName + " already exists");
        }

        return context.add(null, childName).getNode();
    }
View Full Code Here

TOP

Related Classes of org.gatein.api.EntityAlreadyExistsException

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.