public Credentials findLocalCredentials ( final org.eclipse.scada.configuration.infrastructure.EquinoxApplication app ) { logger.debug ( "Looking for credentials: {}", app ); if ( app.getLocalCredentials () != null ) { logger.debug ( "Using local: {}", app.getLocalCredentials () ); return app.getLocalCredentials (); } else { logger.debug ( "Using global: {}", this.infrastructure.getDefaultCredentials () ); return this.infrastructure.getDefaultCredentials (); } }
protected Configuration findSecurityConfiguration ( final org.eclipse.scada.configuration.infrastructure.EquinoxApplication app ) { if ( app.getSecurityConfiguration () != null ) { return app.getSecurityConfiguration (); } else { return this.infrastructure.getDefaultSecurityConfiguration (); } }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { String label = ( (EquinoxApplication)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_EquinoxApplication_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_EquinoxApplication_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { String label = ( (EquinoxApplication)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_EquinoxApplication_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_EquinoxApplication_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * Find the access credentials for the target master server * * @param app * the master server * @return the access credentials, or <code>null</code> if there were none */ public static Credentials findInterconnectCredentials ( final org.eclipse.scada.configuration.infrastructure.EquinoxApplication app ) { if ( app.getLocalCredentials () != null ) { return app.getLocalCredentials (); } else { final org.eclipse.scada.configuration.infrastructure.World world = Containers.findContainer ( app, org.eclipse.scada.configuration.infrastructure.World.class ); if ( world == null ) { return null; } return world.getDefaultCredentials (); } }