Interface MCRCondition

All Known Subinterfaces:
MCRCombinedCondition, MCRFactComputable<F>, MCRFactCondition<F>
All Known Implementing Classes:
MCRAbstractCombinedCondition, MCRAbstractCondition, MCRAbstractFactCondition, MCRAndCondition, MCRCategoryCondition, MCRCreatedByCondition, MCRIPCondition, MCRMODSCollectionCondition, MCRMODSEmbargoCondition, MCRMODSGenreCondition, MCRNotCondition, MCROrCondition, MCRPIHasRegisteredCondition, MCRRegExCondition, MCRRoleCondition, MCRStateCondition, MCRStringCondition, MCRUserCondition

public interface MCRCondition
This interface represents a rule of the fact-based access system. It is specified in the rules.xml file. Sub interfaces are MCRCombinedCondition, which is used to build a boolean algebra (and, or, not, ...) and MCRFactCondition, which validates existing facts or creates new ones. New rules need to be registered in mycore.properties as follows: MCR.Access.Facts.Condition.{type}={class} e.g. MCR.Access.Facts.Condition.ip=org.mycore.access.facts.condition.fact.MCRIPCondition
Author:
Robert Stephan
  • Method Details

    • getType

      String getType()
      the type of the rule
      Returns:
    • matches

      boolean matches(MCRFactsHolder facts)
    • parse

      void parse(Element xml)
    • getBoundElement

      Element getBoundElement()
      This is primary for rules.xml debugging purposes
      Returns:
      the part of the xml which this Condition represents
    • isDebug

      boolean isDebug()
    • setDebug

      void setDebug(boolean b)