Package org.codehaus.plexus.redback.users.jdo

Examples of org.codehaus.plexus.redback.users.jdo.UserDatabase


    }

    public void backupUserDatabase( UserManager manager, File backupDirectory )
        throws IOException, XMLStreamException
    {
        UserDatabase database = new UserDatabase();
        database.setUsers( manager.getUsers() );

        UsersManagementStaxWriter writer = new UsersManagementStaxWriter();
        FileWriter fileWriter = new FileWriter( new File( backupDirectory, USERS_XML_NAME ) );
        try
        {
View Full Code Here


    {
        UsersManagementStaxReader reader = new UsersManagementStaxReader();

        FileReader fileReader = new FileReader( new File( backupDirectory, USERS_XML_NAME ) );

        UserDatabase database;
        try
        {
            database = reader.read( fileReader );
        }
        finally
        {
            IOUtil.close( fileReader );
        }

        for ( Iterator i = database.getUsers().iterator(); i.hasNext(); )
        {
            User user = (User) i.next();

            manager.addUserUnchecked( user );
        }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.redback.users.jdo.UserDatabase

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.