Class UnrestrictedSessionRunner

    • Field Detail

      • originatingUsername

        protected String originatingUsername
      • sessionIsAlreadyUnrestricted

        protected final boolean sessionIsAlreadyUnrestricted
      • repositoryName

        protected final String repositoryName
      • isUnrestricted

        protected boolean isUnrestricted
        True if a call to runUnrestricted() is in progress.
    • Constructor Detail

      • UnrestrictedSessionRunner

        protected UnrestrictedSessionRunner​(CoreSession session)
        Constructs a UnrestrictedSessionRunner given an existing session (which may or may not be already unrestricted).

        Originating user is taken on given session.

        Parameters:
        session - the available session
      • UnrestrictedSessionRunner

        protected UnrestrictedSessionRunner​(String repositoryName)
        Constructs a UnrestrictedSessionRunner given a repository name.
        Parameters:
        repositoryName - the repository name
      • UnrestrictedSessionRunner

        protected UnrestrictedSessionRunner​(String repositoryName,
                                            String originatingUser)
        Constructs a UnrestrictedSessionRunner given a repository name and an originating user name.
        Parameters:
        repositoryName - the repository name
        originatingUser - the user name behind the system user
    • Method Detail

      • getOriginatingUsername

        public String getOriginatingUsername()
      • setOriginatingUsername

        public void setOriginatingUsername​(String originatingUsername)
      • checkUnrestricted

        protected boolean checkUnrestricted​(CoreSession session)
      • runUnrestricted

        public void runUnrestricted()
        Calls the run() method with an unrestricted session. During this call, isUnrestricted is set to true.
      • run

        public abstract void run()
        This method will be called by runUnrestricted() with session available as an unrestricted session.

        It can also be called directly in which case the session available will be the one passed to #UnrestrictedSessionRunner(CoreSession).