Class UserSpaceAvailabilityChecker


  • public class UserSpaceAvailabilityChecker
    extends Object
    Centralizing the determination of the space availability to a user.

    The aim of this implementation is to give the availability of a space taking also into account the status of a space.

    An other aim of this implementation is also to provide some performances by using some computing caches. These caches MUST be scoped only to the treatment context. Due to this behavior, be careful to not keep an instance reference into a kind of singleton.

    Author:
    silveryocha
    • Method Detail

      • getUserId

        public String getUserId()
        Gets the identifier of the user linked to the current instance.
        Returns:
        a string representing a user identifier.
      • isAvailable

        public boolean isAvailable​(String spaceId)
        Is the given identifier the one of a space available to the user of the instance
        Parameters:
        spaceId - the identifier or a space as string.
        Returns:
        true if space is available to the user, false otherwise.