Examples of aliasExists()


Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

     */   
    public void addPasswordAlias(String aliasName, String password) throws ConfigException       
    {
        try {           
            PasswordAdapter p = getPasswordAdapter();
            if (p.aliasExists(aliasName)) {
                throw new ConfigException(_strMgr.getString("passwordAliasExists", aliasName));
            }
            p.setPasswordForAlias(aliasName, password.getBytes());          
        } catch (Exception ex) {
            throw getExceptionHandler().handleConfigException(
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

     */   
    public void removePasswordAlias(String aliasName) throws ConfigException       
    {
        try {           
            PasswordAdapter p = getPasswordAdapter();
            if (!p.aliasExists(aliasName)) {
                throw new ConfigException(_strMgr.getString("passwordAliasDoesNotExist", aliasName));
            }
            p.removeAlias(aliasName);
        } catch (Exception ex) {
            throw getExceptionHandler().handleConfigException(
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

     */   
    public void updatePasswordAlias(String aliasName, String password) throws ConfigException       
    {
        try {
            PasswordAdapter p = getPasswordAdapter();
            if (!p.aliasExists(aliasName)) {
                throw new ConfigException(_strMgr.getString("passwordAliasDoesNotExist", aliasName));
            }
            p.setPasswordForAlias(aliasName, password.getBytes());
        } catch (Exception ex) {
            throw getExceptionHandler().handleConfigException(
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

            return (at);
        }
        final String          an = RelativePathResolver.getAlias(at);
        final String          sp = IdentityManager.getMasterPassword();
        final PasswordAdapter pa = new PasswordAdapter(sp.toCharArray()); // use default password store
        final boolean     exists = pa.aliasExists(an);
        if (!exists) {
            final StringManager lsm = StringManager.getManager(RelativePathResolver.class);
            final String msg = lsm.getString("no_such_alias", an, at);
            throw new IllegalArgumentException(msg);
        }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final PasswordAdapter pa = new PasswordAdapter(null);
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        expandedPassword = new PasswordAdapter(mPass.toCharArray()).getPasswordForAlias(alias);
                    }
                }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

        } catch (final Exception e) { //underlying code is unsafe!
            return (at);
        }
        final String          an = RelativePathResolver.getAlias(at);
        final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter(); // use default password store
        final boolean     exists = pa.aliasExists(an);
        if (!exists) {
            final StringManager lsm = StringManager.getManager(RelativePathResolver.class);
            final String msg = lsm.getString("no_such_alias", an, at);
            throw new IllegalArgumentException(msg);
        }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final PasswordAdapter pa = new PasswordAdapter(null);
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        expandedPassword = new PasswordAdapter(mPass.toCharArray()).getPasswordForAlias(alias);
                    }
                }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");

                    final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        masterPasswordHelper.setMasterPassword(mPass.toCharArray());
                        expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
                    }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

            for (File f : files) {
                //the following property is required for initializing the password helper
                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final PasswordAdapter pa = new PasswordAdapter(null);
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        expandedPassword = new PasswordAdapter(mPass.toCharArray()).getPasswordForAlias(alias);
                    }
                }
View Full Code Here

Examples of com.sun.enterprise.security.store.PasswordAdapter.aliasExists()

                System.setProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY, f.getAbsolutePath());
                try {
                    final MasterPassword masterPasswordHelper = Globals.getDefaultHabitat().getComponent(MasterPassword.class, "Security SSL Password Provider Service");

                    final PasswordAdapter pa = masterPasswordHelper.getMasterPasswordAdapter();
                    final boolean exists = pa.aliasExists(alias);
                    if (exists) {
                        String mPass = getMasterPassword(f.getName());
                        masterPasswordHelper.setMasterPassword(mPass.toCharArray());
                        expandedPassword = masterPasswordHelper.getMasterPasswordAdapter().getPasswordForAlias(alias);
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.