Class LoadDefaultTemplatesTask


  • public class LoadDefaultTemplatesTask
    extends org.apache.tools.ant.Task
    Load template queries form an XML file into a given user profile.
    Author:
    Thomas Riley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Random random  
      • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      Load templates from an xml file into a userprofile account.
      static java.lang.String generatePassword()
      Generate a random 8-letter String of lower-case characters
      void setOSAlias​(java.lang.String osAlias)
      Set the alias of the main object store.
      void setSuperuserPassword​(java.lang.String superuserPassword)
      Set the superuser's initial password.
      void setTemplatesXml​(java.lang.String file)
      Set the templates xml file.
      void setUsername​(java.lang.String user)
      Set the account name to load template to.
      void setUserProfileAlias​(java.lang.String userProfileAlias)
      Set the alias of the userprofile object store.
      • 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

      • random

        protected static java.util.Random random
    • Constructor Detail

      • LoadDefaultTemplatesTask

        public LoadDefaultTemplatesTask()
    • Method Detail

      • setTemplatesXml

        public void setTemplatesXml​(java.lang.String file)
        Set the templates xml file.
        Parameters:
        file - to xml file
      • setUsername

        public void setUsername​(java.lang.String user)
        Set the account name to load template to.
        Parameters:
        user - username to load templates into
      • setOSAlias

        public void setOSAlias​(java.lang.String osAlias)
        Set the alias of the main object store.
        Parameters:
        osAlias - the object store alias
      • setUserProfileAlias

        public void setUserProfileAlias​(java.lang.String userProfileAlias)
        Set the alias of the userprofile object store.
        Parameters:
        userProfileAlias - the object store alias of the userprofile database
      • setSuperuserPassword

        public void setSuperuserPassword​(java.lang.String superuserPassword)
        Set the superuser's initial password. Make sure you change the password afterwards, because passwords stored in properties are likely to be compromised - this is just a bootstrap.
        Parameters:
        superuserPassword - the initial superuser password
      • execute

        public void execute()
        Load templates from an xml file into a userprofile account.
        Overrides:
        execute in class org.apache.tools.ant.Task
      • generatePassword

        public static java.lang.String generatePassword()
        Generate a random 8-letter String of lower-case characters
        Returns:
        the String