|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.ui.meta.core.Meta
public class Meta
Meta is the core class in MetaUI. An instance of meta represents a "Rule Base" (a repository rules), and this rule base is used to compute property maps based on a series of key/value constraints (typically based on the current values in a Context instance). Typically a single Meta instance is shared process wide, usually by way of multiple Context instances on various threads. Meta works in concert with Match.MatchResult to cache partial matches (match trees) with cached computed property maps. Meta is generally used by way of its subclasses ObjectMeta and UIMeta (which extend Meta with behaviors around auto-creating rules for references Java classes, auto-reading rule files associated with referenced java packages, and dynamic properties for field and layout zoning)
Nested Class Summary | |
---|---|
static class |
Meta.OverrideValue
Wrapper for a value that should, in rule application, override any previous value for its property. |
class |
Meta.PropertyManager
Store of policy information for particular properties -- most significantly, how successive values of this property are to be *merged* during rule application. |
static class |
Meta.PropertyMap
The Map type used to accumulate the effective properties through the successive application of rules. |
static interface |
Meta.PropertyMapAwaking
Called on implementing values to allow statically resolvable (but dynamic) values to evaluate/copy themselves for inclusion in a new map (to ensure that a value that derived its value based on a different context doesn't get reused in another) |
static interface |
Meta.PropertyMerger
Define policy for merging a property value assigned by one rule to a subsequent value from a higher ranked rule. |
static class |
Meta.PropertyMerger_And
PropertyMerger implementing AND semantics -- i.e. |
static class |
Meta.PropertyMergerDeclareList
PropertyMerger for properties the should override normally, but return lists when in declare mode (e.g. |
static interface |
Meta.PropertyMergerDynamic
|
static interface |
Meta.PropertyMergerIsChaining
|
class |
Meta.RuleSet
A group of rules originating from a common source. |
static interface |
Meta.ValueQueriedObserver
Implemented by observers for notification of when a paricular key/value has been referenced in the rule base for the first time. |
Field Summary | |
---|---|
static int |
ClassRulePriority
|
static int |
EditorRulePriority
|
static java.lang.String |
KeyAny
|
static java.lang.String |
KeyDeclare
|
static java.lang.String |
KeyTrait
|
static int |
LowRulePriority
|
static Meta.PropertyMerger |
PropertyMerger_DeclareList
|
static Meta.PropertyMerger |
PropertyMerger_List
PropertyMerger for properties the should be unioned as lists |
Meta.PropertyMerger |
PropertyMerger_Traits
PropertyMerger for the 'trait' property. |
static java.lang.String |
RuleFileDelimeter
|
static java.lang.String |
RuleFileDelimeterStart
|
static int |
SystemRulePriority
|
static int |
TemplateRulePriority
|
static ariba.ui.meta.core.Meta.KeyValueTransformer |
Transformer_KeyPresent
|
Constructor Summary | |
---|---|
Meta()
|
Method Summary | |
---|---|
void |
_addRule(Rule rule,
boolean checkPropScope)
|
java.util.List<Rule> |
_addRuleAndReturnExtras(Rule rule)
|
void |
_logRuleStats()
|
void |
_resumeEditingRuleSet(Meta.RuleSet ruleSet)
|
java.util.List<Rule> |
_updateEditedRule(Rule rule,
java.util.List<Rule> extras)
|
void |
addRule(java.util.Map selectorMap,
java.util.Map propertyMap)
|
void |
addRule(java.util.Map selectorMap,
java.util.Map propertyMap,
int rank)
|
void |
addRule(Rule rule)
|
void |
addRules(java.util.Map<java.lang.String,java.lang.Object> ruleSet)
|
void |
addRules(java.util.Map<java.lang.String,java.lang.Object> ruleSet,
java.util.List selectors)
|
static void |
addTrait(java.lang.String trait,
java.util.Map map)
|
static void |
addTraits(java.util.List traits,
java.util.Map map)
|
void |
beginReplacementRuleSet(Meta.RuleSet orig)
|
void |
beginRuleSet(int rank,
java.lang.String filePath)
|
void |
beginRuleSet(java.lang.String filePath)
|
void |
defineKeyAsPropertyScope(java.lang.String contextKey)
|
Meta.RuleSet |
endRuleSet()
|
void |
invalidateRules()
|
static boolean |
isPropertyScopeKey(java.lang.String key)
|
void |
loadRules(java.lang.String ruleText)
|
void |
loadRules(java.lang.String filename,
java.io.InputStream inputStream,
int rank,
boolean editable)
|
Meta.PropertyMerger |
mergerForProperty(java.lang.String propertyName)
|
void |
mirrorPropertyToContext(java.lang.String propertyName,
java.lang.String contextKey)
|
Context |
newContext()
|
java.lang.String |
parsePropertyAssignment(java.lang.String propString,
java.util.Map propertyMap)
|
boolean |
propertyWillDoMerge(java.lang.String propertyName,
java.lang.Object origValue)
|
void |
registerKeyInitObserver(java.lang.String key,
Meta.ValueQueriedObserver o)
|
void |
registerPropertyMerger(java.lang.String propertyName,
Meta.PropertyMerger merger)
|
void |
registerValueTransformerForKey(java.lang.String key,
ariba.ui.meta.core.Meta.KeyValueTransformer transformer)
|
int |
ruleSetGeneration()
|
java.lang.String |
scopeKeyForSelector(java.util.List<Rule.Selector> preds)
|
void |
touch(java.lang.String key,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KeyAny
public static final java.lang.String KeyDeclare
public static final java.lang.String KeyTrait
public static final int LowRulePriority
public static final int SystemRulePriority
public static final int ClassRulePriority
public static final int TemplateRulePriority
public static final int EditorRulePriority
public static final java.lang.String RuleFileDelimeter
public static final java.lang.String RuleFileDelimeterStart
public static final ariba.ui.meta.core.Meta.KeyValueTransformer Transformer_KeyPresent
public static Meta.PropertyMerger PropertyMerger_List
public static Meta.PropertyMerger PropertyMerger_DeclareList
public Meta.PropertyMerger PropertyMerger_Traits
Constructor Detail |
---|
public Meta()
Method Detail |
---|
public void addRule(Rule rule)
public void _addRule(Rule rule, boolean checkPropScope)
public java.util.List<Rule> _addRuleAndReturnExtras(Rule rule)
public java.util.List<Rule> _updateEditedRule(Rule rule, java.util.List<Rule> extras)
public java.lang.String scopeKeyForSelector(java.util.List<Rule.Selector> preds)
public void addRule(java.util.Map selectorMap, java.util.Map propertyMap)
public void addRule(java.util.Map selectorMap, java.util.Map propertyMap, int rank)
public void addRules(java.util.Map<java.lang.String,java.lang.Object> ruleSet, java.util.List selectors)
public void addRules(java.util.Map<java.lang.String,java.lang.Object> ruleSet)
public void loadRules(java.lang.String filename, java.io.InputStream inputStream, int rank, boolean editable)
public void loadRules(java.lang.String ruleText)
public java.lang.String parsePropertyAssignment(java.lang.String propString, java.util.Map propertyMap)
public void beginRuleSet(java.lang.String filePath)
public void beginRuleSet(int rank, java.lang.String filePath)
public void beginReplacementRuleSet(Meta.RuleSet orig)
public Meta.RuleSet endRuleSet()
public void _resumeEditingRuleSet(Meta.RuleSet ruleSet)
public int ruleSetGeneration()
public void invalidateRules()
public Context newContext()
public void touch(java.lang.String key, java.lang.Object value)
public void registerKeyInitObserver(java.lang.String key, Meta.ValueQueriedObserver o)
public void registerValueTransformerForKey(java.lang.String key, ariba.ui.meta.core.Meta.KeyValueTransformer transformer)
public boolean propertyWillDoMerge(java.lang.String propertyName, java.lang.Object origValue)
public void mirrorPropertyToContext(java.lang.String propertyName, java.lang.String contextKey)
public void defineKeyAsPropertyScope(java.lang.String contextKey)
public static boolean isPropertyScopeKey(java.lang.String key)
public void registerPropertyMerger(java.lang.String propertyName, Meta.PropertyMerger merger)
public Meta.PropertyMerger mergerForProperty(java.lang.String propertyName)
public static void addTraits(java.util.List traits, java.util.Map map)
public static void addTrait(java.lang.String trait, java.util.Map map)
public void _logRuleStats()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |