org.rhq.enterprise.server.perspective.activator
Class ActivatorHelper

java.lang.Object
  extended by org.rhq.enterprise.server.perspective.activator.ActivatorHelper

public class ActivatorHelper
extends Object


Constructor Summary
ActivatorHelper()
           
 
Method Summary
static boolean areTraitsSatisfied(org.rhq.core.domain.auth.Subject subject, Map<String,Matcher> traitMatchers, Collection<org.rhq.core.domain.resource.Resource> resources, boolean matchAll)
          Test trait conditions against resources.
static boolean initCommonActivators(CommonActivatorsType rawActivators, List<Activator<?>> activators)
           
static boolean initGlobalActivators(GlobalActivatorsType rawActivators, List<Activator<?>> activators)
           
static boolean initResourceActivators(ResourceActivatorsType rawActivators, List<Activator<?>> activators)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivatorHelper

public ActivatorHelper()
Method Detail

areTraitsSatisfied

public static boolean areTraitsSatisfied(org.rhq.core.domain.auth.Subject subject,
                                         Map<String,Matcher> traitMatchers,
                                         Collection<org.rhq.core.domain.resource.Resource> resources,
                                         boolean matchAll)
Test trait conditions against resources. Optionally, one or all resources must much all of the trait conditions.

Parameters:
subject - The current user
traitMatchers - The trait activator pattern matchers that must all be satisfied
resources - The resources whose trait values will be tested
matchAll - If true then all resources must pass, if false only one must pass
Returns:
true if, optionally, all or any resources satisfy the trait conditions

initCommonActivators

public static boolean initCommonActivators(CommonActivatorsType rawActivators,
                                           List<Activator<?>> activators)

initGlobalActivators

public static boolean initGlobalActivators(GlobalActivatorsType rawActivators,
                                           List<Activator<?>> activators)

initResourceActivators

public static boolean initResourceActivators(ResourceActivatorsType rawActivators,
                                             List<Activator<?>> activators)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.