Class MCRRealmFactory

java.lang.Object
org.mycore.user2.MCRRealmFactory

public class MCRRealmFactory extends Object
Handles MCRRealm instantiation. Will create a file ${MCR.datadir}/realms.xml if that file does not exist. You can redefine the location if you define a URI in MCR.users2.Realms.URI. This class monitors the source file for changes and adapts at runtime.
Author:
Thomas Scheffler (yagee)
  • Constructor Details

    • MCRRealmFactory

      public MCRRealmFactory()
  • Method Details

    • getRealm

      public static MCRRealm getRealm(String id)
      Returns the realm with the given ID.
      Parameters:
      id - the ID of the realm
      Returns:
      the realm with that ID, or null
    • getAttributeMapper

      public static MCRUserAttributeMapper getAttributeMapper(String id)
    • listRealms

      public static List<MCRRealm> listRealms()
      Returns a list of all defined realms.
      Returns:
      a list of all realms.
    • getRealmsDocument

      public static Document getRealmsDocument()
      Returns the Realms JDOM document clone.
    • getLocalRealm

      public static MCRRealm getLocalRealm()
      Returns the local default realm, as specified by the attribute 'local' in realms.xml
      Returns:
      the local default realm.