public boolean canDetermineActivation( Profile profile ) { return profile.getActivation() != null && profile.getActivation() instanceof AlwaysOnActivation; }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && profile.getActivation().getFile() != null; }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && profile.getActivation().getFile() != null; }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && profile.getActivation().getProperty() != null; }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && profile.getActivation().getProperty() != null; }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && StringUtils.isNotEmpty( profile.getActivation().getJdk() ); }
protected boolean canDetectActivation( Profile profile ) { return profile.getActivation() != null && StringUtils.isNotEmpty( profile.getActivation().getJdk() ); }
public boolean canDetermineActivation( Profile profile ) { Activation activation = profile.getActivation(); return activation != null && activation.getOs() != null; }
public boolean canDetermineActivation( Profile profile ) { Activation activation = profile.getActivation(); return activation != null && activation.getOs() != null; }
private boolean isActiveByDefault( Profile profile ) { Activation activation = profile.getActivation(); return activation != null && activation.isActiveByDefault(); }
@Override public boolean presentInConfig( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) { Activation activation = profile.getActivation(); if ( activation == null ) { return false; } ActivationProperty property = activation.getProperty(); if ( property == null ) { return false; } return true; }
@Override public boolean presentInConfig( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) { Activation activation = profile.getActivation(); if ( activation == null ) { return false; } ActivationFile file = activation.getFile(); if ( file == null ) { return false; } return true; }
@Override public boolean presentInConfig( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) { Activation activation = profile.getActivation(); if ( activation == null ) { return false; } ActivationOS os = activation.getOs(); if ( os == null ) { return false; } return true; }
@Override public boolean presentInConfig( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) { Activation activation = profile.getActivation(); if ( activation == null ) { return false; } String jdk = activation.getJdk(); if ( jdk == null ) { return false; } return true; }
private Map<String, Activation> getProfileActivations( Model model, boolean clone ) { Map<String, Activation> activations = new HashMap<>(); for ( Profile profile : model.getProfiles() ) { Activation activation = profile.getActivation(); if ( activation == null ) { continue; } if ( clone ) { activation = activation.clone(); } activations.put( profile.getId(), activation ); } return activations; }
private void injectProfileActivations( Model model, Map<String, Activation> activations ) { for ( Profile profile : model.getProfiles() ) { Activation activation = profile.getActivation(); if ( activation == null ) { continue; } // restore activation profile.setActivation( activations.get( profile.getId() ) ); } }
public void addProfile( Profile profile ) { String profileId = profile.getId(); Profile existing = profilesById.get( profileId ); if ( existing != null ) { logger.warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() + ") with new instance from source: " + profile.getSource() ); } profilesById.put( profile.getId(), profile ); Activation activation = profile.getActivation(); if ( activation != null && activation.isActiveByDefault() ) { activateAsDefault( profileId ); } }
public void addProfile( Profile profile ) { String profileId = profile.getId(); Profile existing = (Profile) profilesById.get( profileId ); if ( existing != null ) { container.getLogger().warn( "Overriding profile: \'" + profileId + "\' (source: " + existing.getSource() + ") with new instance from source: " + profile.getSource() ); } profilesById.put( profile.getId(), profile ); Activation activation = profile.getActivation(); if ( activation != null && activation.isActiveByDefault() ) { activateAsDefault( profileId ); } }
public static Profile cloneProfile( Profile src ) { if ( src == null ) { return null; } Profile result = new Profile(); cloneModelBaseFields( src, result ); result.setActivation( cloneActivation( src.getActivation() ) ); BuildBase resultBuild = null; if ( src.getBuild() != null ) { resultBuild = new BuildBase(); cloneBuildBaseFields( src.getBuild(), resultBuild ); } result.setBuild( resultBuild ); result.setId( src.getId() ); result.setSource( src.getSource() ); return result; }
public boolean isActive( Profile profile ) { Activation activation = profile.getActivation(); ActivationOS os = activation.getOs(); boolean result = ensureAtLeastOneNonNull( os ); if ( result && os.getFamily() != null ) { result = determineFamilyMatch( os.getFamily() ); } if ( result && os.getName() != null ) { result = determineNameMatch( os.getName() ); } if ( result && os.getArch() != null ) { result = determineArchMatch( os.getArch() ); } if ( result && os.getVersion() != null ) { result = determineVersionMatch( os.getVersion() ); } return result; }