Class GrantTask


  • public class GrantTask
    extends org.apache.tools.ant.Task
    Task to grant permissions on all tables in a database to a given user.
    Author:
    Andrew Varley, Richard Smith
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String database  
      protected java.lang.String perm  
      protected java.lang.String user  
      • Fields inherited from class org.apache.tools.ant.Task

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        project
    • Constructor Summary

      Constructors 
      Constructor Description
      GrantTask()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      void setDatabase​(java.lang.String database)
      Set the database alias
      void setPerm​(java.lang.String perm)
      The permission to grant: SELECT, INSERT, UPDATE, DELETE, RULE, REFERENCES, TRIGGER, ALL
      void setUser​(java.lang.String user)
      Set user to grant permissions to
      • Methods inherited from class org.apache.tools.ant.Task

        getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        getProject, setProject
      • Methods inherited from class java.lang.Object

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

      • database

        protected java.lang.String database
      • user

        protected java.lang.String user
      • perm

        protected java.lang.String perm
    • Constructor Detail

      • GrantTask

        public GrantTask()
    • Method Detail

      • setDatabase

        public void setDatabase​(java.lang.String database)
        Set the database alias
        Parameters:
        database - the database alias
      • setUser

        public void setUser​(java.lang.String user)
        Set user to grant permissions to
        Parameters:
        user - a username
      • setPerm

        public void setPerm​(java.lang.String perm)
        The permission to grant: SELECT, INSERT, UPDATE, DELETE, RULE, REFERENCES, TRIGGER, ALL
        Parameters:
        perm - the permission to set
      • execute

        public void execute()
        Overrides:
        execute in class org.apache.tools.ant.Task