src/main/java/org/jboss/loom/migrators/security/SecurityMigrator.java
@Override
    public void loadSourceServerConfig(MigrationContext ctx) throws LoadMigrationException {
        try {
            File file = new File(getGlobalConfig().getAS5Config().getConfDir(), "login-config.xml");
            if (!file.canRead()) {
                throw new LoadMigrationException("Can't read: " + file.getAbsolutePath());
            }

            Unmarshaller unmarshaller = JAXBContext.newInstance(SecurityAS5Bean.class).createUnmarshaller();
            SecurityAS5Bean securityAS5 = (SecurityAS5Bean) unmarshaller.unmarshal(file);

            MigratorData mData = new MigratorData();
            mData.getConfigFragments().addAll(securityAS5.getApplicationPolicies());

            ctx.getMigrationData().put(SecurityMigrator.class, mData);
        } catch (JAXBException e) {
            throw new LoadMigrationException(e);
        }
    }
/**
     *  Loads the AS 5 data.
     */
Loads the AS 5 data.
Loads the AS 5 data .
@Override
    public void loadSourceServerConfig(MigrationContext ctx) throws LoadMigrationException {
        try {
            File file = new File(getGlobalConfig().getAS5Config().getConfDir(), "login-config.xml");
            if (!file.canRead()) {
                throw new LoadMigrationException("Can't read: " + file.getAbsolutePath());
            }
            Unmarshaller unmarshaller = JAXBContext.newInstance(SecurityAS5Bean.class).createUnmarshaller();
            SecurityAS5Bean securityAS5 = (SecurityAS5Bean) unmarshaller.unmarshal(file);
            MigratorData mData = new MigratorData();
            mData.getConfigFragments().addAll(securityAS5.getApplicationPolicies());
            ctx.getMigrationData().put(SecurityMigrator.class, mData);
        } catch (JAXBException e) {
            throw new LoadMigrationException(e);
        }
    }
@ Override public void loadSourceServerConfig ( MigrationContext ctx ) throws LoadMigrationException { try { File file = new File ( getGlobalConfig ( ) . getAS5Config ( ) . getConfDir ( ) , "login-config.xml" ) ; if ( ! file . canRead ( ) ) { throw new LoadMigrationException ( "Can't read: " + file . getAbsolutePath ( ) ) ; } Unmarshaller unmarshaller = JAXBContext . newInstance ( SecurityAS5Bean . class ) . createUnmarshaller ( ) ; SecurityAS5Bean securityAS5 = ( SecurityAS5Bean ) unmarshaller . unmarshal ( file ) ; MigratorData mData = new MigratorData ( ) ; mData . getConfigFragments ( ) . addAll ( securityAS5 . getApplicationPolicies ( ) ) ; ctx . getMigrationData ( ) . put ( SecurityMigrator . class , mData ) ; } catch ( JAXBException e ) { throw new LoadMigrationException ( e ) ; } }
Loads the AS 5 data.
Loads the AS 5 data .