Package org.agorava.api.exception

Examples of org.agorava.api.exception.ProviderMismatchException


         * @throws ProviderMismatchException if parameter is null or if no provider exists for this name
         */
        public Builder providerName(String providerName) throws ProviderMismatchException {
            qualifier = AgoravaContext.getServicesToQualifier().get(providerName);
            if (qualifier == null)
                throw new ProviderMismatchException("No provider found with name : " + providerName);
            return this;
        }
View Full Code Here


        public Builder qualifier(Annotation qualifier) throws ProviderMismatchException {
            this.qualifier = qualifier;
            if (qualifier != null && AgoravaContext.getQualifierToService().containsKey(qualifier))
                return this;
            else
                throw new ProviderMismatchException("No provider found for qualifier : " + qualifier);
        }
View Full Code Here

            return current;
        }
        if (getCurrentRepository().getCurrent().equals(OAuthSession.NULL)) {
            buildSessionFor(qualifier);
        } else if (!getCurrentRepository().getCurrent().getServiceQualifier().equals(qualifier)) {
            throw new ProviderMismatchException("Inconsistent state between repo and service. In repo Session provider is " +
                    getCurrentRepository().getCurrent().getServiceName() + " while service provider is " + qualifier);
        }

        return getCurrentRepository().getCurrent();
    }
View Full Code Here

TOP

Related Classes of org.agorava.api.exception.ProviderMismatchException

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.