|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.commons.id.uuid.task.UUIDTask
public class UUIDTask
Simple Ant task to generate a UUID. See the following Ant script for usage:
<project default="generate.uuid" name="uuid" basedir="."> <taskdef name="uuid" className="org.apache.commons.id.uuid.task.UUIDTask"/> <target name="generate.uuid" description="Generates a UUID"> <uuid version="VERSION_ONE"/> <echo message="${uuid}"/> <uuid version="VERSION_THREE"/> <echo message="${uuid}"/> <uuid version="VERSION_FOUR"/> <echo message="${uuid}"/> <uuid version="VERSION_FIVE"/> <echo message="${uuid}"/> </target> </project>The namespace urn:uuid:B4F00409-CEF8-4822-802C-DEB20704C365 and the name www.apache.org is used as default to generate the UUIDs for version 3 and 5.
Nested Class Summary | |
---|---|
static class |
UUIDTask.UUIDVersion
The enum for the UUID version. |
Field Summary |
---|
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 | |
---|---|
UUIDTask()
|
Method Summary | |
---|---|
void |
execute()
|
void |
setName(java.lang.String name)
Setter for the name used to generate a UUID version 3 or 5. |
void |
setNamespace(java.lang.String namespace)
Setter for the namespace used to generate a UUID version 3 or 5. |
void |
setVersion(UUIDTask.UUIDVersion newVersion)
Set the UUID version to generate. |
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
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 |
Constructor Detail |
---|
public UUIDTask()
Method Detail |
---|
public void setName(java.lang.String name)
name
- the name ot usepublic void setNamespace(java.lang.String namespace)
namespace
- the name ot usepublic void setVersion(UUIDTask.UUIDVersion newVersion)
newVersion
- the UUID versionpublic void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |