Examples of SettingsSecurity


Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

        String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );

        String master = null;

        SettingsSecurity sec = SecUtil.read( file, true );
        if ( sec != null )
        {
            master = sec.getMaster();
        }

        if ( master == null )
        {
            throw new IllegalStateException( "Master password is not set in the setting security file: " + file );
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

            String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );

            String master = null;

            SettingsSecurity sec = SecUtil.read( file, true );
            if ( sec != null )
            {
                master = sec.getMaster();
            }

            if ( master == null )
            {
                throw new IllegalStateException( "Master password is not set in the setting security file: " + file );
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

        {
            Map attr = stripAttributes( bare );
           
            String res = null;

            SettingsSecurity sec = getSec();
           
            if( attr == null || attr.get( "type" ) == null )
            {
                String master = getMaster( sec );
               
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

        String realLocation = location.charAt( 0 ) == '~'
            ? System.getProperty( "user.home" ) + location.substring( 1 )
            : location
            ;
       
        SettingsSecurity sec = SecUtil.read( realLocation, true );
       
        if( sec == null )
            throw new SecDispatcherException( "cannot retrieve master password. Please check that "+realLocation+" exists and has data" );
       
        return sec;
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

       
        if( showMaster )
            System.out.println( dc.encryptAndDecorate( pass, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) );
        else
        {
            SettingsSecurity sec = dd.getSec();
            System.out.println( dc.encryptAndDecorate( pass, dd.getMaster(sec) ) );
        }
    }
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

       
        try
        {
            in = toStream( location );
           
            SettingsSecurity sec = new SecurityConfigurationXpp3Reader().read( in );
           
            in.close();
           
            if( cycle && sec.getRelocation() != null )
                return read( sec.getRelocation(), true );
           
            return sec;
        }
        catch ( Exception e )
        {
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

     * @return SettingsSecurity
     */
    private SettingsSecurity parseSettingsSecurity( String tagName, XmlPullParser parser, boolean strict )
        throws IOException, XmlPullParserException
    {
        SettingsSecurity settingsSecurity = new SettingsSecurity();
        java.util.Set parsed = new java.util.HashSet();
        int eventType = parser.getEventType();
        boolean foundRoot = false;
        while ( eventType != XmlPullParser.END_DOCUMENT )
        {
            if ( eventType == XmlPullParser.START_TAG )
            {
                if ( parser.getName().equals( tagName ) )
                {
                    foundRoot = true;
                }
                else if ( strict && ! foundRoot )
                {
                    throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
                }
                else if ( checkFieldWithDuplicate( parser, "master", null, parsed ) )
                {
                    settingsSecurity.setMaster( getTrimmedValue( parser.nextText() ) );
                }
                else if ( checkFieldWithDuplicate( parser, "relocation", null, parsed ) )
                {
                    settingsSecurity.setRelocation( getTrimmedValue( parser.nextText() ) );
                }
                else if ( checkFieldWithDuplicate( parser, "configurations", null, parsed ) )
                {
                    java.util.List configurations = new java.util.ArrayList/*<Config>*/();
                    settingsSecurity.setConfigurations( configurations );
                    while ( parser.nextTag() == XmlPullParser.START_TAG )
                    {
                        if ( parser.getName().equals( "configuration" ) )
                        {
                            configurations.add( parseConfig( "configuration", parser, strict ) );
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

            String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );

            String master = null;

            SettingsSecurity sec = SecUtil.read( file, true );
            if ( sec != null )
            {
                master = sec.getMaster();
            }

            if ( master == null )
            {
                throw new IllegalStateException( "Master password is not set in the setting security file: " + file );
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

            String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );

            String master = null;

            SettingsSecurity sec = SecUtil.read( file, true );
            if ( sec != null )
            {
                master = sec.getMaster();
            }

            if ( master == null )
            {
                throw new IllegalStateException( "Master password is not set in the setting security file: " + file );
View Full Code Here

Examples of org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity

            String file = System.getProperty( DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION, configurationFile );

            String master = null;

            SettingsSecurity sec = SecUtil.read( file, true );
            if ( sec != null )
            {
                master = sec.getMaster();
            }

            if ( master == null )
            {
                throw new IllegalStateException( "Master password is not set in the setting security file: " + file );
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.