public static Boolean isProperty ( final OperatingSystemDescriptor operatingSystem, final String name, final Boolean defaultValue ) { OperatingSystemDescriptor os = operatingSystem; while ( os != null ) { final Boolean value = Properties.isProperty ( operatingSystem.getProperties (), name, null ); if ( value != null ) { return value; } os = os.getParent (); } return defaultValue; }
public static void validate ( final SerialToNetworkSetupModule setupModule, final OperatingSystemDescriptor descriptor ) throws Exception { if ( !OperatingSystemDescriptors.isProperty ( descriptor, DPKG_DIVERT, false ) ) { throw new IllegalStateException ( String.format ( "Operating system %s does not support '%s'. Or it is not set to 'true'.", descriptor.getId (), DPKG_DIVERT ) ); } } }
public void validate () { final String version = Properties.get ( this.os.getProperties (), POSTGRES_VERSION_KEY, null ); if ( version == null ) { this.ctx.add ( "Operating system does not provide PostgreSQL" ); } else if ( !POSTGRES_VERSION_VALUE.equals ( version ) ) { this.ctx.add ( "Requires '{0}' = {1} but found ({2})", POSTGRES_VERSION_KEY, POSTGRES_VERSION_VALUE, version ); } final Map<String, String> props = Properties.makeAttributes ( this.os.getProperties () ); getConfigurationFile ( props ); getHostBasedAccessFile ( props ); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OperatingSystemDescriptor getParent () { if ( parent != null && parent.eIsProxy () ) { InternalEObject oldParent = (InternalEObject)parent; parent = (OperatingSystemDescriptor)eResolveProxy ( oldParent ); if ( parent != oldParent ) { if ( eNotificationRequired () ) eNotify ( new ENotificationImpl ( this, Notification.RESOLVE, SetupPackage.OPERATING_SYSTEM_DESCRIPTOR__PARENT, oldParent, parent ) ); } } return parent; }
/** * 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 = ( (OperatingSystemDescriptor)object ).getLabel (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_OperatingSystemDescriptor_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_OperatingSystemDescriptor_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public OperatingSystemDescriptor getOperatingSystem () { if ( operatingSystem != null && operatingSystem.eIsProxy () ) { InternalEObject oldOperatingSystem = (InternalEObject)operatingSystem; operatingSystem = (OperatingSystemDescriptor)eResolveProxy ( oldOperatingSystem ); if ( operatingSystem != oldOperatingSystem ) { if ( eNotificationRequired () ) eNotify ( new ENotificationImpl ( this, Notification.RESOLVE, DeploymentPackage.COMMON_DEPLOYMENT_MECHANISM__OPERATING_SYSTEM, oldOperatingSystem, operatingSystem ) ); } } return operatingSystem; }
public static Boolean isProperty ( final OperatingSystemDescriptor operatingSystem, final String name, final Boolean defaultValue ) { OperatingSystemDescriptor os = operatingSystem; while ( os != null ) { final Boolean value = Properties.isProperty ( operatingSystem.getProperties (), name, null ); if ( value != null ) { return value; } os = os.getParent (); } return defaultValue; }
public static String getProperty ( final OperatingSystemDescriptor operatingSystem, final String name, final String defaultValue ) { OperatingSystemDescriptor os = operatingSystem; while ( os != null ) { final String value = Properties.getProperty ( operatingSystem.getProperties (), name, null ); if ( value != null ) { return value; } os = os.getParent (); } return defaultValue; }
public static String getProperty ( final OperatingSystemDescriptor operatingSystem, final String name, final String defaultValue ) { OperatingSystemDescriptor os = operatingSystem; while ( os != null ) { final String value = Properties.getProperty ( operatingSystem.getProperties (), name, null ); if ( value != null ) { return value; } os = os.getParent (); } return defaultValue; }