protected static void clearNulls ( final Profile profile ) { for ( final Iterator<SystemProperty> i = profile.getProperty ().iterator (); i.hasNext (); ) { final SystemProperty prop = i.next (); if ( prop.getValue () == null ) { i.remove (); } } }
public static void removeSystemProperty ( final Profile profile, final String key ) { for ( final Iterator<SystemProperty> i = profile.getProperty ().iterator (); i.hasNext (); ) { final SystemProperty p = i.next (); if ( p.getKey ().equals ( key ) ) { i.remove (); } } }
public static void removeSystemProperty ( final Profile profile, final String key ) { for ( final Iterator<SystemProperty> i = profile.getProperty ().iterator (); i.hasNext (); ) { final SystemProperty p = i.next (); if ( p.getKey ().equals ( key ) ) { i.remove (); } } }
protected static void clearNulls ( final Profile profile ) { for ( final Iterator<SystemProperty> i = profile.getProperty ().iterator (); i.hasNext (); ) { final SystemProperty prop = i.next (); if ( prop.getValue () == null ) { i.remove (); } } }
private void put ( final Profile prof, final String key, final String value ) { final SystemProperty prop = ProfileFactory.eINSTANCE.createSystemProperty (); prof.getProperty ().add ( prop ); prop.setEval ( false ); prop.setKey ( key ); prop.setValue ( value ); }
private void put ( final Profile prof, final String key, final String value ) { final SystemProperty prop = ProfileFactory.eINSTANCE.createSystemProperty (); prof.getProperty ().add ( prop ); prop.setEval ( false ); prop.setKey ( key ); prop.setValue ( value ); }
public static void addSystemProperty ( final Profile profile, final String key, final Object value ) { removeSystemProperty ( profile, key ); // now add final SystemProperty prop = ProfileFactory.eINSTANCE.createSystemProperty (); prop.setKey ( key ); if ( value != null ) { prop.setValue ( "" + value ); } else { // we do set null here since we want to cancel out higher level values prop.setValue ( null ); } profile.getProperty ().add ( prop ); }
public static void addSystemProperty ( final Profile profile, final String key, final Object value ) { removeSystemProperty ( profile, key ); // now add final SystemProperty prop = ProfileFactory.eINSTANCE.createSystemProperty (); prop.setKey ( key ); if ( value != null ) { prop.setValue ( "" + value ); } else { // we do set null here since we want to cancel out higher level values prop.setValue ( null ); } profile.getProperty ().add ( prop ); }
static void mergeIntoProfile ( final Profile source, final Profile target ) { target.getInstallationUnits ().addAll ( source.getInstallationUnits () ); target.getJvmArguments ().addAll ( source.getJvmArguments () ); target.getArguments ().addAll ( source.getArguments () ); target.getNotes ().addAll ( source.getNotes () ); target.getSetbsl ().addAll ( EcoreUtil.copyAll ( source.getSetbsl () ) ); target.getStart ().addAll ( EcoreUtil.copyAll ( source.getStart () ) ); target.getProperty ().addAll ( EcoreUtil.copyAll ( source.getProperty () ) ); // merge sub profiles for ( final SubProfile subProfile : source.getProfile () ) { mergeSubProfile ( subProfile, findTargetSubProfile ( subProfile.getName (), target ) ); } }
static void mergeIntoProfile ( final Profile source, final Profile target ) { target.getInstallationUnits ().addAll ( source.getInstallationUnits () ); target.getJvmArguments ().addAll ( source.getJvmArguments () ); target.getArguments ().addAll ( source.getArguments () ); target.getNotes ().addAll ( source.getNotes () ); target.getSetbsl ().addAll ( EcoreUtil.copyAll ( source.getSetbsl () ) ); target.getStart ().addAll ( EcoreUtil.copyAll ( source.getStart () ) ); target.getProperty ().addAll ( EcoreUtil.copyAll ( source.getProperty () ) ); // merge sub profiles for ( final SubProfile subProfile : source.getProfile () ) { mergeSubProfile ( subProfile, findTargetSubProfile ( subProfile.getName (), target ) ); } }
public void process ( final EquinoxApplication app ) { // get profile final Profile profile = Profiles.createOrGetCustomizationProfile ( app ); // add system property final SystemProperty prop = ProfileFactory.eINSTANCE.createSystemProperty (); prop.setKey ( PropertyAuthenticationService.PROP ); prop.setValue ( makeValue ( this.userService.getUsers () ) ); profile.getProperty ().add ( prop ); // add service Profiles.addStartBundle ( profile, "org.eclipse.scada.sec.provider.plain.property" ); }
p.setProperty ( "osgi.noShutdown", "true" ); //$NON-NLS-1$ //$NON-NLS-2$ p.setProperty ( "osgi.syspath", String.format ( "[INSTALLDIR]\\apps\\%1$s\\plugins", eas.getName () ) ); //$NON-NLS-1$ //$NON-NLS-2$ for ( final SystemProperty prop : profile.getProperty () )
p.setProperty ( "osgi.noShutdown", "true" ); //$NON-NLS-1$ //$NON-NLS-2$ p.setProperty ( "osgi.syspath", String.format ( "[INSTALLDIR]\\apps\\%1$s\\plugins", eas.getName () ) ); //$NON-NLS-1$ //$NON-NLS-2$ for ( final SystemProperty prop : profile.getProperty () )