Package org.wso2.carbon.user.core.claim

Examples of org.wso2.carbon.user.core.claim.ClaimManager


        layoutManager.setVerticalLayout(true);
        layoutManager.setYSpacing(20);
        layoutManager.setYSpacing(50);
        layoutManager.layoutSVG(bpel.getRootActivity());

        SVGImpl svg = new SVGImpl();
        svg.setRootActivity(bpel.getRootActivity());
       
        return(svg);
    }
View Full Code Here


            if (UserCoreConstants.DEFAULT_PROFILE.equals(profileName)) {
                throw new UserProfileException("Cannot delete default profile");
            }
            realm = getUserRealm();

            ClaimManager cman = realm.getClaimManager();
            String[] claims = cman.getAllClaimUris();
            UserStoreManager admin = realm.getUserStoreManager();
            admin.deleteUserClaimValues(username, claims, profileName);
            admin.deleteUserClaimValue(username, UserCoreConstants.PROFILE_CONFIGURATION,
                            profileName);
        } catch (UserStoreException e) {
View Full Code Here

     *
     * @return
     * @throws Exception
     */
    public Claim[] getAllSupportedClaims() throws Exception {
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
View Full Code Here

     */
    public ClaimMapping[] getAllSupportedClaimMappings() throws Exception {
        ClaimMapping[] claimMappings = new ClaimMapping[0];
        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }

            claims = (Claim[]) claimManager.getAllSupportClaimsByDefault();
            if (claims != null) {
                claimMappings = new ClaimMapping[claims.length];
                for (int i = 0; i < claims.length; i++) {
                    claimMapping = new ClaimMapping(null, null);
                    claimMapping.setClaim(claims[i]);
View Full Code Here

     */
    public ClaimMapping[] getAllClaimMappings() throws Exception {
        ClaimMapping[] claimMappings = new ClaimMapping[0];
        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }

            claims = (Claim[]) claimManager.getAllClaims();
            if (claims != null) {
                claimMappings = new ClaimMapping[claims.length];
                for (int i = 0; i < claims.length; i++) {
                    claimMapping = new ClaimMapping(null, null);
                    claimMapping.setClaim(claims[i]);
                    claimMapping.setMappedAttribute(claimManager.getAttributeName(claims[i]
                            .getClaimUri()));
                    claimMappings[i] = claimMapping;
                }
            }

View Full Code Here

        return claimMappings;
    }

    public ClaimMapping getClaimMapping(String claimURI) throws Exception {
        ClaimMapping claimMapping = null;
        ClaimManager claimManager = null;
        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
                claimMapping = (ClaimMapping) claimManager.getClaimMapping(claimURI);
               
            }
        } catch (UserStoreException e) {
            log.error("Error occurred while loading supported claims", e);
            getException("Error occurred while retrieving claim", e);
View Full Code Here

    public ClaimMapping[] getAllSupportedClaimMappings(String dialectUri)
            throws Exception {
        ClaimMapping[] claimMappings = new ClaimMapping[0];
        ClaimMapping claimMapping = null;
        Claim[] claims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return new ClaimMapping[0];
            }
            claims = getAllSupportedClaims(dialectUri);
            if (claims != null && claims.length > 0) {
                claimMappings = new ClaimMapping[claims.length];
                for (int i = 0; i < claims.length; i++) {
                    claimMapping = new ClaimMapping(null, null);
                    claimMapping.setClaim(claims[i]);
                    claimMapping.setMappedAttribute(claimManager.getAttributeName(claims[i]
                            .getClaimUri()));
                    claimMappings[i] = claimMapping;
                }
            }
View Full Code Here

     * @throws Exception
     */
    public Claim[] getAllSupportedClaims(String dialectUri) throws Exception {
        Claim[] claims = new Claim[0];
        ArrayList<Claim> reqClaims = null;
        ClaimManager claimManager = null;

        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager == null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                return claims;
            }
            claims = (Claim[]) claimManager.getAllSupportClaimsByDefault();
            reqClaims = new ArrayList<Claim>();
            for (int i = 0; i < claims.length; i++) {
                if (dialectUri.equals(claims[i].getDialectURI())) {
                    reqClaims.add(claims[i]);
                }
View Full Code Here

    /**
     * @param mapping
     * @throws Exception
     */
    public void upateClaimMapping(ClaimMapping mapping) throws Exception {
        ClaimManager claimManager = null;
        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                claimManager.updateClaimMapping(mapping);
            }
        } catch (UserStoreException e) {
            log.error("Error occurred while updating claim mapping", e);
            getException("Error occurred while updating claim mapping", e);
        }
View Full Code Here

     *
     * @param mapping
     * @throws Exception
     */
    public void addNewClaimMapping(ClaimMapping mapping) throws Exception {
        ClaimManager claimManager = null;
        try {
            UserRealm realm = getRealm();
            claimManager = realm.getClaimManager();
            if (claimManager != null) {
                // There can be cases - we get a request for an external user store - where we don'
                // have a claims administrator.
                claimManager.addNewClaimMapping(mapping);
            }
        } catch (UserStoreException e) {
            log.error("Error occurred while adding new claim mapping", e);
            getException("Error occurred while adding new claim mapping", e);
        }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.user.core.claim.ClaimManager

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.