Class AliasesInfo

java.lang.Object
org.bedework.calfacade.AliasesInfo
All Implemented Interfaces:
Serializable

public class AliasesInfo extends Object implements Serializable
Provide information about the aliases to a collection that can reference an href.

When we have a change to a resource we need to determine if that resource is visible via aliases to the containing collection

So if the containing collection is C and the resource has the name C/N it might be visible via the resource A which aliases C with the href A/N

The resource might not be visible if C or A are filtered or if dav access has restricted the rights.

Furthermore, we might have an alias A' to A, with a possibly different owner and different filtering.

This class is the result of querying the collections and aliases to determine that visibility. As this is a relatively expensive process we try to cache as much as possible. We can cache a copy that only contains entries for each collection and alias without reference to the entities. This can form the basis of an entity search. This cache needs to be flushed whenever there is a change to the system that affects any of these entries

We could also store the structure created when checking a given entity. This is flushed if the entity is deleted or - again - if the alias structure changes

Author:
Mike Douglass douglm rpi.edu
See Also:
  • Constructor Details

    • AliasesInfo

      public AliasesInfo(String principalHref, BwCalendar collection, String entityName)
      Parameters:
      principalHref - the owner of the collection
      collection - collection of interest
      entityName - - the entity being updated
  • Method Details

    • getPrincipalHref

      public String getPrincipalHref()
      Returns:
      owner
    • getCollection

      public BwCalendar getCollection()
      Returns:
      collection
    • getEntityName

      public String getEntityName()
      Returns:
      name of entity
    • setExternalCua

      public void setExternalCua(boolean val)
    • getExternalCua

      public boolean getExternalCua()
      Returns:
      true if Principal ref is a cua of an external user
    • setVisible

      public void setVisible(boolean val)
    • getVisible

      public boolean getVisible()
      Returns:
      true if entity is visible
    • getShared

      public boolean getShared()
      Returns:
      true for shared collection
    • setNotificationsEnabled

      public void setNotificationsEnabled(boolean val)
    • getNotificationsEnabled

      public boolean getNotificationsEnabled()
      Returns:
      true if notificationsEnabled
    • addSharee

      public void addSharee(AliasesInfo ai)
    • getAliases

      public List<AliasesInfo> getAliases()
    • referencesCollection

      public boolean referencesCollection(String val)
      Parameters:
      val - href of a collection that may be referenced by an alias
      Returns:
      true if this object references that collection
    • makeKey

      public String makeKey()
    • makeKey

      public static String makeKey(String collectionHref, String entityName)
    • copyForEntity

      public AliasesInfo copyForEntity(String entityName, boolean visible)