Package com.sun.enterprise.security.auth.realm.file

Examples of com.sun.enterprise.security.auth.realm.file.FileRealm


   
        public String[]
    getUserNames()
        throws MBeanConfigException
    {
        final FileRealm realm = getRealmKeyFile();
        try
        {
            return toStringArray(realm.getUserNames());
        }
        catch(BadRealmException bre)
        {
            throw new MBeanConfigException(bre.getMessage());
        }
View Full Code Here


    /**
     * Returns names of all the groups from the instance realm keyfile
     */
    public String[] getGroupNames() throws MBeanConfigException
    {
        final FileRealm realm = getRealmKeyFile();
        try
        {
            return toStringArray(realm.getGroupNames());
        }
        catch(BadRealmException bre)
        {
            throw new MBeanConfigException(bre.getMessage());
        }
View Full Code Here

        if( userName == null )
        {
            throw new IllegalArgumentException( "" + null );
        }

        final FileRealm realm = getRealmKeyFile();
        try
        {
            return toStringArray(realm.getGroupNames(userName));
        }
        catch(NoSuchUserException nse)
        {
            throw new MBeanConfigException(nse.getMessage());
        }
View Full Code Here

        final String userName,
        final String password,
        final String[] groupList)
        throws MBeanConfigException
    {
        final FileRealm realm = getRealmKeyFile();
        try
        {
            realm.addUser(userName, password, groupList);
            saveInstanceRealmKeyFile(realm);
        }
        catch(Exception e)
        {
            throw new MBeanConfigException( e.getMessage() );
View Full Code Here

     * Remove user from file realm. User must exist.
     */
    public void removeUser( final String userName)
        throws MBeanConfigException
    {
        final FileRealm realm = getRealmKeyFile();
        try
        {
            realm.removeUser(userName);
            saveInstanceRealmKeyFile(realm);
        }
        catch(NoSuchUserException nse)
        {
            throw new MBeanConfigException(nse.getMessage());
View Full Code Here

        final String userName,
        final String password,
        final String[] groupList)
        throws MBeanConfigException
    {
        final FileRealm realm = getRealmKeyFile();
        try
        {
            realm.updateUser(userName, userName, password, groupList);
            saveInstanceRealmKeyFile( realm );
        }
        catch( Exception e )
        {
            throw new MBeanConfigException( e .getMessage() );
View Full Code Here

    private FileRealm getInstanceRealmKeyFile() throws MBeanConfigException
    {
        InstanceEnvironment env = new InstanceEnvironment(mInstanceName);
        try
        {
            return new FileRealm(env.getBackupRealmsKeyFilePath());
        }
        catch(BadRealmException bre)
        {
            //String msg =  localStrings.getString( "admin.server.core.mbean.config.bad_realm", mInstanceName);
            throw new MBeanConfigException(bre.getMessage());
View Full Code Here

    /**
     * Returns names of all the users from instance realm keyfile
     */
    public String[] getUserNames() throws MBeanConfigException
    {
        FileRealm realm = getInstanceRealmKeyFile();
        try
        {
            return convertEnumerationToStringArray(realm.getUserNames());
        }
        catch(BadRealmException bre)
        {
            //String msg =  localStrings.getString( "admin.server.core.mbean.config.bad_realm", mInstanceName);
            throw new MBeanConfigException(bre.getMessage());
View Full Code Here

    /**
     * Returns names of all the groups from the instance realm keyfile
     */
    public String[] getGroupNames() throws MBeanConfigException
    {
        FileRealm realm = getInstanceRealmKeyFile();
        try
        {
            return convertEnumerationToStringArray(realm.getGroupNames());
        }
        catch(BadRealmException bre)
        {
            //String msg =  localStrings.getString( "admin.server.core.mbean.config.bad_realm", mInstanceName);
            throw new MBeanConfigException(bre.getMessage());
View Full Code Here

    /**
     * Returns the name of all the groups that this user belongs to from the instance realm keyfile
     */
    public String[] getUserGroupNames(String userName) throws MBeanConfigException
    {
        FileRealm realm = getInstanceRealmKeyFile();
        try
        {
            return convertEnumerationToStringArray(realm.getGroupNames(userName));
        }
        catch(NoSuchUserException nse)
        {
            //String msg =  localStrings.getString( "admin.server.core.mbean.config.no_such_user", mInstanceName, userName);
            throw new MBeanConfigException(nse.getMessage());
View Full Code Here

TOP

Related Classes of com.sun.enterprise.security.auth.realm.file.FileRealm

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.