Class AnonProfile


  • public final class AnonProfile
    extends Profile
    A null-object for profiles for use with the web services. This profile will act as through the user has no history of any kind. Any attempt to save history will be discarded.
    Author:
    Alex Kalderimis
    • Field Detail

      • USERNAME

        public static final java.lang.String USERNAME
        The user name of the anonymous user.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AnonProfile

        public AnonProfile()
        Constructor
    • Method Detail

      • enableSaving

        public void enableSaving()
        Description copied from class: Profile
        Re-enable saving when saveTemplate(), deleteQuery() etc. are called. Also calls ProfileManager.saveProfile() to write this Profile to the database and rebuilds the template description index.
        Overrides:
        enableSaving in class Profile
      • isSuperuser

        public boolean isSuperuser()
        Description copied from class: Profile
        Return true if and only if the user logged is superuser
        Overrides:
        isSuperuser in class Profile
        Returns:
        Return true if superuser
      • isLoggedIn

        public boolean isLoggedIn()
        Description copied from class: Profile
        Return true if and only if the user is logged is (and the Profile will be written to the userprofile).
        Overrides:
        isLoggedIn in class Profile
        Returns:
        Return true if logged in
      • createBag

        public InterMineBag createBag​(java.lang.String name,
                                      java.lang.String type,
                                      java.lang.String desc,
                                      java.util.Map classKeys)
        Description copied from class: Profile
        Create a bag and save it to the userprofile database.
        Overrides:
        createBag in class Profile
        Parameters:
        name - the bag name
        type - the bag type
        desc - the bag description
        classKeys - the classKeys used to obtain the primary identifier field
        Returns:
        the new bag
      • getUsername

        public java.lang.String getUsername()
        Description copied from class: Profile
        Get the value of username
        Overrides:
        getUsername in class Profile
        Returns:
        the value of username
      • getDayToken

        public java.lang.String getDayToken()
        Description copied from class: Profile
        Get a token with at least an hour of validity, and up to 24 hours.
        Overrides:
        getDayToken in class Profile
        Returns:
        A token for web-service use.