Class UserManager

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected UserManager​(GroupManager groupManager)
      Constructor for UserManager.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkSaltedPassword​(java.lang.String raw, java.lang.String encrypted)
      checkSaltedPassword
      boolean comparePasswords​(java.lang.String userID, java.lang.String aPassword)
      This method compares two encrypted strings for equality.
      int countUsersWithRole​(java.lang.String roleid)
      countUsersWithRole
      void deleteUser​(java.lang.String name)
      Removes the user from the list of users.
      protected abstract void doUpdate()
      update
      java.lang.String encryptedPassword​(java.lang.String aPassword, boolean useSalt)
      encryptedPassword
      java.lang.String getContactInfo​(java.lang.String userID, java.lang.String command)
      Get the contact info given a command string
      java.lang.String getContactInfo​(java.lang.String userId, UserConfig.ContactType contactType)
      getContactInfo
      java.lang.String getContactInfo​(User user, java.lang.String command)
      getContactInfo
      java.lang.String getContactServiceProvider​(java.lang.String userID, java.lang.String command)
      Get the contact service provider, given a command string
      java.lang.String getContactServiceProvider​(User user, java.lang.String command)
      getContactServiceProvider
      java.lang.String getEmail​(java.lang.String userID)
      Get a email by name
      java.lang.String getEmail​(User user)
      Get a email by user
      abstract long getFileSize()  
      java.lang.String getHomePhone​(java.lang.String userID)
      Get a home phone number
      java.lang.String getHomePhone​(User user)
      Get a home phone number
      abstract long getLastModified()  
      java.lang.String getMicroblogName​(java.lang.String name)
      Get a user's microblog username by username
      java.lang.String getMicroblogName​(User user)
      Get a user's microblog username by User
      java.lang.String getMobilePhone​(java.lang.String userID)
      Get a mobile phone number
      java.lang.String getMobilePhone​(User user)
      Get a mobile phone number
      java.lang.String getNumericPage​(java.lang.String userID)
      Get a numeric service provider
      java.lang.String getNumericPage​(User user)
      Get a numeric service provider
      java.lang.String getNumericPin​(java.lang.String userID)
      Get a numeric pin
      java.lang.String getNumericPin​(User user)
      Get a numeric pin
      OnmsUser getOnmsUser​(java.lang.String username)
      getOnmsUser
      OnmsUserList getOnmsUserList()
      getOnmsUserList
      java.lang.String getPagerEmail​(java.lang.String userID)
      Get a pager email by name
      java.lang.String getPagerEmail​(User user)
      Get a pager email by user
      java.lang.String getTextPage​(java.lang.String userID)
      Get a Text Page Service Provider
      java.lang.String getTextPage​(User user)
      Get a Text Page Service Provider
      java.lang.String getTextPin​(java.lang.String userID)
      Get a text pin
      java.lang.String getTextPin​(User user)
      Get a text pin
      java.lang.String getTuiPin​(java.lang.String name)
      Get a user's telephone PIN by name
      java.lang.String getTuiPin​(User user)
      Get a user's telephone PIN by User object
      User getUser​(java.lang.String name)
      Get a user by name
      java.util.List<java.lang.String> getUserNames()
      getUserNames
      java.util.Map<java.lang.String,​User> getUsers()
      Return a Map of usernames to user instances.
      java.lang.String[] getUsersScheduledForRole​(java.lang.String roleid, java.util.Date time)
      getUsersScheduledForRole
      java.lang.String[] getUsersWithRole​(java.lang.String roleid)
      getUsersWithRole
      java.lang.String getWorkPhone​(java.lang.String userID)
      Get a work phone number
      java.lang.String getWorkPhone​(User user)
      Get a work phone number
      java.lang.String getXMPPAddress​(java.lang.String userID)
      Get an XMPP address by name
      java.lang.String getXMPPAddress​(User user)
      Get an XMPP address by name
      boolean hasOnCallRole​(java.lang.String roleid)
      hasOnCallRole
      boolean hasUser​(java.lang.String userName)
      Returns a boolean indicating if the user name appears in the XML file
      abstract boolean isUpdateNeeded()  
      boolean isUserOnDuty​(java.lang.String user, java.util.Calendar time)
      Determines if a user is on duty at a given time.
      boolean isUserScheduledForRole​(User user, java.lang.String roleid, java.util.Date time)
      isUserScheduledForRole
      void parseXML​(java.io.InputStream in)
      parseXML
      abstract void reload()  
      void renameUser​(java.lang.String oldName, java.lang.String newName)
      When this method is called users name is changed, so also is the username belonging to the group and the view.
      void save​(OnmsUser onmsUser)
      save
      void saveUser​(java.lang.String name, User details)
      Adds a new user and overwrites the "users.xml"
      void saveUsers​(java.util.Collection<User> usersList)
      saveUsers
      protected abstract void saveXML​(java.lang.String writerString)
      saveXML
      void setContactInfo​(java.lang.String userId, UserConfig.ContactType contactType, java.lang.String contactValue)
      setContactInfo
      void setEncryptedPassword​(java.lang.String userID, java.lang.String aPassword, boolean salted)
      Sets the password for this user, assuming that the value passed in is already encrypted properly
      void setUnencryptedPassword​(java.lang.String userID, java.lang.String aPassword)
      Sets the password for this user, first encrypting it
      void update()
      update
      boolean userHasRole​(User user, java.lang.String roleid)
      userHasRole
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ALLOW_UNSALTED_PROPERTY

        public static final java.lang.String ALLOW_UNSALTED_PROPERTY
        See Also:
        Constant Field Values
      • m_users

        protected java.util.Map<java.lang.String,​User> m_users
        A mapping of user IDs to the User objects
      • m_dutySchedules

        protected java.util.Map<java.lang.String,​java.util.List<DutySchedule>> m_dutySchedules
        The duty schedules for each user
    • Constructor Detail

      • UserManager

        protected UserManager​(GroupManager groupManager)

        Constructor for UserManager.

        Parameters:
        groupManager - a GroupManager object.
    • Method Detail

      • parseXML

        public void parseXML​(java.io.InputStream in)

        parseXML

        Specified by:
        parseXML in interface UserConfig
        Parameters:
        in - a InputStream object.
      • saveUser

        public void saveUser​(java.lang.String name,
                             User details)
                      throws java.lang.Exception
        Adds a new user and overwrites the "users.xml"
        Specified by:
        saveUser in interface UserConfig
        Parameters:
        name - a String object.
        details - a User object.
        Throws:
        java.lang.Exception - if any.
      • save

        public void save​(OnmsUser onmsUser)
                  throws java.lang.Exception
        Description copied from interface: UserConfig

        save

        Specified by:
        save in interface UserConfig
        Throws:
        java.lang.Exception
      • isUserOnDuty

        public boolean isUserOnDuty​(java.lang.String user,
                                    java.util.Calendar time)
                             throws java.io.IOException
        Determines if a user is on duty at a given time. If a user has no duty schedules listed in the configuration file, that user is assumed to always be on duty.
        Specified by:
        isUserOnDuty in interface UserConfig
        Parameters:
        user - the user id
        time - the time to check for a duty schedule
        Returns:
        boolean, true if the user is on duty, false otherwise.
        Throws:
        java.io.IOException - if any.
      • getUsers

        public java.util.Map<java.lang.String,​User> getUsers()
                                                            throws java.io.IOException
        Return a Map of usernames to user instances.
        Specified by:
        getUsers in interface UserConfig
        Returns:
        a Map object.
        Throws:
        java.io.IOException - if any.
      • getOnmsUserList

        public OnmsUserList getOnmsUserList()
                                     throws java.io.IOException
        Description copied from interface: UserConfig

        getOnmsUserList

        Specified by:
        getOnmsUserList in interface UserConfig
        Returns:
        an OnmsUserList
        Throws:
        java.io.IOException
      • getOnmsUser

        public OnmsUser getOnmsUser​(java.lang.String username)
                             throws java.io.IOException
        Description copied from interface: UserConfig

        getOnmsUser

        Specified by:
        getOnmsUser in interface UserConfig
        Returns:
        an OnmsUser
        Throws:
        java.io.IOException
      • hasUser

        public boolean hasUser​(java.lang.String userName)
                        throws java.io.IOException
        Returns a boolean indicating if the user name appears in the XML file
        Specified by:
        hasUser in interface UserConfig
        Parameters:
        userName - a String object.
        Returns:
        true if the user exists in the XML file, false otherwise
        Throws:
        java.io.IOException - if any.
      • getUserNames

        public java.util.List<java.lang.String> getUserNames()
                                                      throws java.io.IOException

        getUserNames

        Specified by:
        getUserNames in interface UserConfig
        Returns:
        a List object.
        Throws:
        java.io.IOException - if any.
      • getUser

        public User getUser​(java.lang.String name)
                     throws java.io.IOException
        Get a user by name
        Specified by:
        getUser in interface UserConfig
        Parameters:
        name - the name of the user to return
        Returns:
        the user specified by name
        Throws:
        java.io.IOException - if any.
      • getTuiPin

        public java.lang.String getTuiPin​(java.lang.String name)
                                   throws java.io.IOException
        Get a user's telephone PIN by name
        Specified by:
        getTuiPin in interface UserConfig
        Parameters:
        name - the name of the user to return
        Returns:
        the telephone PIN of the user specified by name
        Throws:
        java.io.IOException - if any.
      • getTuiPin

        public java.lang.String getTuiPin​(User user)
                                   throws java.io.IOException
        Get a user's telephone PIN by User object
        Specified by:
        getTuiPin in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        the telephone PIN of the user specified by user
        Throws:
        java.io.IOException - if any.
      • getMicroblogName

        public java.lang.String getMicroblogName​(java.lang.String name)
                                          throws java.io.FileNotFoundException,
                                                 java.io.IOException
        Get a user's microblog username by username
        Specified by:
        getMicroblogName in interface UserConfig
        Parameters:
        name - the username of the user whose microblog username should be returned
        Returns:
        the microblog username of the specified user
        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • getMicroblogName

        public java.lang.String getMicroblogName​(User user)
                                          throws java.io.FileNotFoundException,
                                                 java.io.IOException
        Get a user's microblog username by User
        Parameters:
        user - the user object of the user whose microblog username should be returned
        Returns:
        the microblog username of the specified user
        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • setContactInfo

        public void setContactInfo​(java.lang.String userId,
                                   UserConfig.ContactType contactType,
                                   java.lang.String contactValue)
                            throws java.lang.Exception
        Description copied from interface: UserConfig

        setContactInfo

        Specified by:
        setContactInfo in interface UserConfig
        Throws:
        java.lang.Exception
      • getContactInfo

        public java.lang.String getContactInfo​(java.lang.String userId,
                                               UserConfig.ContactType contactType)
                                        throws java.io.IOException
        Description copied from interface: UserConfig

        getContactInfo

        Specified by:
        getContactInfo in interface UserConfig
        Returns:
        a String
        Throws:
        java.io.IOException
      • getContactInfo

        public java.lang.String getContactInfo​(java.lang.String userID,
                                               java.lang.String command)
                                        throws java.io.IOException
        Get the contact info given a command string
        Specified by:
        getContactInfo in interface UserConfig
        Parameters:
        userID - the name of the user
        command - the command to look up the contact info for
        Returns:
        the contact information
        Throws:
        java.io.IOException - if any.
      • getContactInfo

        public java.lang.String getContactInfo​(User user,
                                               java.lang.String command)
                                        throws java.io.IOException

        getContactInfo

        Specified by:
        getContactInfo in interface UserConfig
        Parameters:
        user - a User object.
        command - a String object.
        Returns:
        a String object.
        Throws:
        java.io.IOException - if any.
      • getContactServiceProvider

        public java.lang.String getContactServiceProvider​(java.lang.String userID,
                                                          java.lang.String command)
                                                   throws java.io.IOException
        Get the contact service provider, given a command string
        Specified by:
        getContactServiceProvider in interface UserConfig
        Parameters:
        userID - the name of the user
        command - the command to look up the contact info for
        Returns:
        the contact information
        Throws:
        java.io.IOException - if any.
      • getContactServiceProvider

        public java.lang.String getContactServiceProvider​(User user,
                                                          java.lang.String command)
                                                   throws java.io.IOException

        getContactServiceProvider

        Specified by:
        getContactServiceProvider in interface UserConfig
        Parameters:
        user - a User object.
        command - a String object.
        Returns:
        a String object.
        Throws:
        java.io.IOException - if any.
      • getEmail

        public java.lang.String getEmail​(java.lang.String userID)
                                  throws java.io.IOException
        Get a email by name
        Specified by:
        getEmail in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the email specified by name
        Throws:
        java.io.IOException - if any.
      • getEmail

        public java.lang.String getEmail​(User user)
                                  throws java.io.IOException
        Get a email by user
        Specified by:
        getEmail in interface UserConfig
        Parameters:
        user - the user to find the email for
        Returns:
        String the email specified by name
        Throws:
        java.io.IOException - if any.
      • getPagerEmail

        public java.lang.String getPagerEmail​(java.lang.String userID)
                                       throws java.io.IOException
        Get a pager email by name
        Specified by:
        getPagerEmail in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the pager email
        Throws:
        java.io.IOException - if any.
      • getPagerEmail

        public java.lang.String getPagerEmail​(User user)
                                       throws java.io.IOException
        Get a pager email by user
        Specified by:
        getPagerEmail in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the pager email
        Throws:
        java.io.IOException - if any.
      • getNumericPin

        public java.lang.String getNumericPin​(java.lang.String userID)
                                       throws java.io.IOException
        Get a numeric pin
        Specified by:
        getNumericPin in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the numeric pin
        Throws:
        java.io.IOException - if any.
      • getNumericPin

        public java.lang.String getNumericPin​(User user)
                                       throws java.io.IOException
        Get a numeric pin
        Specified by:
        getNumericPin in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the numeric pin
        Throws:
        java.io.IOException - if any.
      • getXMPPAddress

        public java.lang.String getXMPPAddress​(java.lang.String userID)
                                        throws java.io.IOException
        Get an XMPP address by name
        Specified by:
        getXMPPAddress in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the XMPP address
        Throws:
        java.io.IOException - if any.
      • getXMPPAddress

        public java.lang.String getXMPPAddress​(User user)
                                        throws java.io.IOException
        Get an XMPP address by name
        Specified by:
        getXMPPAddress in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the XMPP address
        Throws:
        java.io.IOException - if any.
      • getNumericPage

        public java.lang.String getNumericPage​(java.lang.String userID)
                                        throws java.io.IOException
        Get a numeric service provider
        Specified by:
        getNumericPage in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the service provider
        Throws:
        java.io.IOException - if any.
      • getNumericPage

        public java.lang.String getNumericPage​(User user)
                                        throws java.io.IOException
        Get a numeric service provider
        Specified by:
        getNumericPage in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the service provider
        Throws:
        java.io.IOException - if any.
      • getTextPin

        public java.lang.String getTextPin​(java.lang.String userID)
                                    throws java.io.IOException
        Get a text pin
        Specified by:
        getTextPin in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the text pin
        Throws:
        java.io.IOException - if any.
      • getTextPin

        public java.lang.String getTextPin​(User user)
                                    throws java.io.IOException
        Get a text pin
        Specified by:
        getTextPin in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the text pin
        Throws:
        java.io.IOException - if any.
      • getTextPage

        public java.lang.String getTextPage​(java.lang.String userID)
                                     throws java.io.IOException
        Get a Text Page Service Provider
        Specified by:
        getTextPage in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the text page service provider.
        Throws:
        java.io.IOException - if any.
      • getTextPage

        public java.lang.String getTextPage​(User user)
                                     throws java.io.IOException
        Get a Text Page Service Provider
        Specified by:
        getTextPage in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the text page service provider.
        Throws:
        java.io.IOException - if any.
      • getWorkPhone

        public java.lang.String getWorkPhone​(java.lang.String userID)
                                      throws java.io.IOException
        Get a work phone number
        Specified by:
        getWorkPhone in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the work phone number
        Throws:
        java.io.IOException - if any.
      • getWorkPhone

        public java.lang.String getWorkPhone​(User user)
                                      throws java.io.IOException
        Get a work phone number
        Specified by:
        getWorkPhone in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the work phone number
        Throws:
        java.io.IOException - if any.
      • getMobilePhone

        public java.lang.String getMobilePhone​(java.lang.String userID)
                                        throws java.io.IOException
        Get a mobile phone number
        Specified by:
        getMobilePhone in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the mobile phone number
        Throws:
        java.io.IOException - if any.
      • getMobilePhone

        public java.lang.String getMobilePhone​(User user)
                                        throws java.io.IOException
        Get a mobile phone number
        Specified by:
        getMobilePhone in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the mobile phone number
        Throws:
        java.io.IOException - if any.
      • getHomePhone

        public java.lang.String getHomePhone​(java.lang.String userID)
                                      throws java.io.IOException
        Get a home phone number
        Specified by:
        getHomePhone in interface UserConfig
        Parameters:
        userID - the user ID of the user to return
        Returns:
        String the home phone number
        Throws:
        java.io.IOException - if any.
      • getHomePhone

        public java.lang.String getHomePhone​(User user)
                                      throws java.io.IOException
        Get a home phone number
        Specified by:
        getHomePhone in interface UserConfig
        Parameters:
        user - a User object.
        Returns:
        String the home phone number
        Throws:
        java.io.IOException - if any.
      • saveUsers

        public void saveUsers​(java.util.Collection<User> usersList)
                       throws java.lang.Exception

        saveUsers

        Specified by:
        saveUsers in interface UserConfig
        Parameters:
        usersList - a Collection object.
        Throws:
        java.lang.Exception - if any.
      • deleteUser

        public void deleteUser​(java.lang.String name)
                        throws java.lang.Exception
        Removes the user from the list of users. Then overwrites to the "users.xml"
        Specified by:
        deleteUser in interface UserConfig
        Parameters:
        name - a String object.
        Throws:
        java.lang.Exception - if any.
      • saveXML

        protected abstract void saveXML​(java.lang.String writerString)
                                 throws java.io.IOException

        saveXML

        Parameters:
        writerString - a String object.
        Throws:
        java.io.IOException - if any.
      • renameUser

        public void renameUser​(java.lang.String oldName,
                               java.lang.String newName)
                        throws java.lang.Exception
        When this method is called users name is changed, so also is the username belonging to the group and the view. Also overwrites the "users.xml" file
        Specified by:
        renameUser in interface UserConfig
        Parameters:
        oldName - a String object.
        newName - a String object.
        Throws:
        java.lang.Exception - if any.
      • setEncryptedPassword

        public void setEncryptedPassword​(java.lang.String userID,
                                         java.lang.String aPassword,
                                         boolean salted)
                                  throws java.lang.Exception
        Sets the password for this user, assuming that the value passed in is already encrypted properly
        Specified by:
        setEncryptedPassword in interface UserConfig
        Parameters:
        userID - the user ID to change the password for
        aPassword - the encrypted password
        Throws:
        java.lang.Exception - if any.
      • setUnencryptedPassword

        public void setUnencryptedPassword​(java.lang.String userID,
                                           java.lang.String aPassword)
                                    throws java.lang.Exception
        Sets the password for this user, first encrypting it
        Specified by:
        setUnencryptedPassword in interface UserConfig
        Parameters:
        userID - the user ID to change the password for
        aPassword - the password
        Throws:
        java.lang.Exception - if any.
      • encryptedPassword

        public java.lang.String encryptedPassword​(java.lang.String aPassword,
                                                  boolean useSalt)

        encryptedPassword

        Specified by:
        encryptedPassword in interface UserConfig
        Parameters:
        aPassword - a String object.
        useSalt - TODO
        Returns:
        a String object.
      • comparePasswords

        public boolean comparePasswords​(java.lang.String userID,
                                        java.lang.String aPassword)
        This method compares two encrypted strings for equality.
        Specified by:
        comparePasswords in interface UserConfig
        Parameters:
        userID - the user ID to check against.
        aPassword - the password to check for equality
        Returns:
        true if the two passwords are equal (after encryption), false otherwise
      • checkSaltedPassword

        public boolean checkSaltedPassword​(java.lang.String raw,
                                           java.lang.String encrypted)
        Description copied from interface: UserConfig

        checkSaltedPassword

        Specified by:
        checkSaltedPassword in interface UserConfig
        Returns:
        a boolean
      • doUpdate

        protected abstract void doUpdate()
                                  throws java.io.IOException,
                                         java.io.FileNotFoundException

        update

        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.
      • update

        public final void update()
                          throws java.io.IOException,
                                 java.io.FileNotFoundException
        Description copied from interface: UserConfig

        update

        Specified by:
        update in interface UserConfig
        Throws:
        java.io.IOException
        java.io.FileNotFoundException
      • getUsersWithRole

        public java.lang.String[] getUsersWithRole​(java.lang.String roleid)
                                            throws java.io.IOException

        getUsersWithRole

        Specified by:
        getUsersWithRole in interface UserConfig
        Parameters:
        roleid - a String object.
        Returns:
        an array of String objects.
        Throws:
        java.io.IOException - if any.
      • userHasRole

        public boolean userHasRole​(User user,
                                   java.lang.String roleid)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException

        userHasRole

        Specified by:
        userHasRole in interface UserConfig
        Parameters:
        user - a User object.
        roleid - a String object.
        Returns:
        a boolean.
        Throws:
        java.io.FileNotFoundException - if any.
        java.io.IOException - if any.
      • isUserScheduledForRole

        public boolean isUserScheduledForRole​(User user,
                                              java.lang.String roleid,
                                              java.util.Date time)
                                       throws java.io.FileNotFoundException,
                                              java.io.IOException

        isUserScheduledForRole

        Specified by:
        isUserScheduledForRole in interface UserConfig
        Parameters:
        user - a User object.
        roleid - a String object.
        time - a Date object.
        Returns:
        a boolean.
        Throws:
        java.io.FileNotFoundException - if any.
        java.io.IOException - if any.
      • getUsersScheduledForRole

        public java.lang.String[] getUsersScheduledForRole​(java.lang.String roleid,
                                                           java.util.Date time)
                                                    throws java.io.IOException

        getUsersScheduledForRole

        Specified by:
        getUsersScheduledForRole in interface UserConfig
        Parameters:
        roleid - a String object.
        time - a Date object.
        Returns:
        an array of String objects.
        Throws:
        java.io.IOException - if any.
      • hasOnCallRole

        public boolean hasOnCallRole​(java.lang.String roleid)
                              throws java.io.IOException

        hasOnCallRole

        Specified by:
        hasOnCallRole in interface UserConfig
        Parameters:
        roleid - a String object.
        Returns:
        a boolean.
        Throws:
        java.io.IOException - if any.
      • countUsersWithRole

        public int countUsersWithRole​(java.lang.String roleid)
                               throws java.io.IOException

        countUsersWithRole

        Specified by:
        countUsersWithRole in interface UserConfig
        Parameters:
        roleid - a String object.
        Returns:
        a int.
        Throws:
        java.io.IOException - if any.
      • isUpdateNeeded

        public abstract boolean isUpdateNeeded()
      • getLastModified

        public abstract long getLastModified()
      • getFileSize

        public abstract long getFileSize()
      • reload

        public abstract void reload()
                             throws java.io.IOException,
                                    java.io.FileNotFoundException
        Throws:
        java.io.IOException
        java.io.FileNotFoundException