Package org.wso2.carbon.user.core.profile

Examples of org.wso2.carbon.user.core.profile.ProfileConfigurationManager


    }

    public byte[] getProcessImage(String processId) {

        QName qName = decode(processId);
        SVGInterface svg = createSVG(qName);
        return svg.toPNGBytes();
    }
View Full Code Here


    private SVGInterface createSVG(QName qName) {

        // generate new
        InputStream in = getBpelDescriptor(qName);

        SVGInterface svg = null;

        try {
            svg = BPEL2SVGUtil.generate(in);

            if (svg == null)
View Full Code Here

   
    protected static SVGImpl generateSVGImpl(java.io.InputStream is) throws java.io.IOException {
      byte[] b=new byte[is.available()];
      is.read(b);
   
      BPELInterface bpel = new BPELImpl();
        OMElement bpelStr = bpel.load(new String(b));
       
        bpel.processBpelString(bpelStr);

        LayoutManager layoutManager = BPEL2SVGFactory.getInstance().getLayoutManager();
        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

   * @param transformer The optional image transformer
   * @throws java.io.IOException Failed to generate the representation
   */
    public static void generate(java.io.InputStream is, java.io.OutputStream os,
                SVGImageTransformer transformer) throws java.io.IOException {
        SVGImpl svg = generateSVGImpl(is);
       
        if (transformer == null) {
          String str=svg.getHeaders()+svg.generateSVGString();
          os.write(str.getBytes());
        } else {
          transformer.transform(svg, os);
        }
    }
View Full Code Here

        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

            UserRealm realm = getUserRealm();

            UserStoreManager ur = realm.getUserStoreManager();

            ProfileConfigurationManager profileAdmin = realm
                    .getProfileConfigurationManager();
            if (profileAdmin != null) {
                availableProfileConfigurations = getAvailableProfileConfiguration(profileAdmin);
            }
View Full Code Here

        String[] availableProfileConfigurations = new String[0];
        try {
            UserRealm realm = getUserRealm();
            Claim[] claims = getClaimsToEnterData(realm);

            ProfileConfigurationManager profileAdmin = realm
                    .getProfileConfigurationManager();
            if (profileAdmin != null) {
                availableProfileConfigurations = getAvailableProfileConfiguration(profileAdmin);
            }
View Full Code Here

            }

            UserRealm realm = getUserRealm();

            UserStoreManager ur = realm.getUserStoreManager();
            ProfileConfigurationManager profileAdmin = realm
                    .getProfileConfigurationManager();

            String[] profileNames = ur.getProfileNames(username);
            boolean found = false;
View Full Code Here

     * @throws ProfileManagementException
     */
    public DetailedProfileConfigurationDTO getAllAvailableProfileConfiguraionsForDialect(
            String dialect) throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;
        // This map contains profile configurations against their corresponding
        // configuration name.
        ProfileConfiguration[] profileConfigs = null;
        // To iterate over profileConfigurations
        Iterator<Entry<String, ProfileConfiguration>> iterator = null;
        // This is the profile configuration corresponding to the given dialect
        // to act on the given
        // user store.
        DetailedProfileConfigurationDTO detailedConfiguration = null;
        List<ProfileConfigurationDTO> configurations = null;

        validateInputParameters(new String[] { dialect });

        try {

            // Get available profile configurations for internal user store.
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined ";
                if (log.isDebugEnabled()) {
                    log.debug(message);
                }
                return null;
            }

            // Get all profile configurations defined for the given user store.
            // profileConfigurations = profileManager.getProfileConfigs();
            detailedConfiguration = new DetailedProfileConfigurationDTO();
            profileConfigs = (ProfileConfiguration[]) profileManager.getAllProfiles();
            // We are interested on the given dialect only.
            detailedConfiguration.setDialect(dialect);
            configurations = new ArrayList<ProfileConfigurationDTO>();
            for (ProfileConfiguration profileConfig : profileConfigs) {
                if (profileConfig.getDialectName().equals(dialect)) {
View Full Code Here

     * @return
     */
    public ClaimConfigurationDTO[] getProfileConfiguration(String dialect, String profileConfig)
            throws ProfileManagementException {
        UserRealm realm = null;
        ProfileConfigurationManager profileManager = null;
        ClaimManager claimManager = null;
        ProfileConfiguration profileConfiguration = null;
        ClaimConfigurationDTO claim = null;
        List<ClaimConfigurationDTO> claimList = null;
        List<String> hiddenClaims = null;
        List<String> overriddenClaims = null;
        List<String> inheritedClaims = null;
        Claim[] definedClaims = null;
        List<String> definedClaimsList = null;

        validateInputParameters(new String[] { dialect, profileConfig });

        try {
            realm = getRealm();
            profileManager = realm.getProfileConfigurationManager();

            if (profileManager == null) {
                String message = "No profile configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
                }
                return null;
            }

            claimManager = realm.getClaimManager();

            if (claimManager == null) {
                String message = "No claim configurations defined";
                if (log.isDebugEnabled()) {
                    log.debug(message);
                }
                throw new ProfileManagementException(message);
            }

            definedClaimsList = new ArrayList<String>();
            definedClaims = (Claim[]) claimManager.getAllClaims(dialect);

            for (int i = 0; i < definedClaims.length; i++) {
                definedClaimsList.add(definedClaims[i].getClaimUri());
            }

            profileConfiguration = (ProfileConfiguration) profileManager.getProfileConfig(profileConfig);

            // A container for all the claims applicable to the current profile
            // configuration.
            claimList = new ArrayList<ClaimConfigurationDTO>();
            hiddenClaims = profileConfiguration.getHiddenClaims();
View Full Code Here

TOP

Related Classes of org.wso2.carbon.user.core.profile.ProfileConfigurationManager

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.