Package org.intermine.web.task
Class LoadDefaultTemplatesTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.intermine.web.task.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
-
Constructor Summary
Constructors Constructor Description LoadDefaultTemplatesTask()
-
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 charactersvoid
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
-
-
-
-
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 classorg.apache.tools.ant.Task
-
generatePassword
public static java.lang.String generatePassword()
Generate a random 8-letter String of lower-case characters- Returns:
- the String
-
-