hudson.scm
Class SubversionTagAction

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.TaskAction
          extended by hudson.scm.AbstractScmTagAction
              extended by hudson.scm.SubversionTagAction
All Implemented Interfaces:
Action, BuildBadgeAction, ModelObject, SearchableModelObject, SearchItem

public class SubversionTagAction
extends AbstractScmTagAction

Action that lets people create tag for the given build.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 class SubversionTagAction.TagWorkerThread
          The thread that performs tagging operation asynchronously.
 
Field Summary
 
Fields inherited from class hudson.scm.AbstractScmTagAction
build
 
Fields inherited from class hudson.model.TaskAction
log, workerThread
 
Method Summary
 void doSubmit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
          Invoked to actually tag the workspace.
 java.lang.String getDisplayName()
          Gets the string to be displayed.
 java.lang.String getIconFileName()
          Gets the file name of the icon.
 Permission getPermission()
          Defaults to SCM.TAG.
 java.util.Map<SubversionSCM.SvnInfo,java.util.List<java.lang.String>> getTags()
           
 java.lang.String getTooltip()
          This message is shown as the tool tip of the build badge icon.
 boolean hasTags()
          Was any tag created by the user already?
 boolean isTagged()
          Returns true if this build has already been tagged at least once.
 java.lang.String makeTagURL(SubversionSCM.SvnInfo si)
          Creates a URL, to be used as the default value of the module tag URL.
 
Methods inherited from class hudson.scm.AbstractScmTagAction
chooseAction, doIndex, getACL, getBuild, getUrlName
 
Methods inherited from class hudson.model.TaskAction
doClearError, doProgressiveLog, getLog, getSearchUrl, getWorkerThread
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasTags

public boolean hasTags()
Was any tag created by the user already?


getIconFileName

public java.lang.String getIconFileName()
Description copied from interface: Action
Gets the file name of the icon.

Returns:
If just a file name (like "abc.gif") is returned, it will be interpreted as a file name inside /images/24x24. This is useful for using one of the stock images.

If an absolute file name that starts from '/' is returned (like "/plugin/foo/abc.gif'), then it will be interpreted as a path from the context root of Hudson. This is useful to pick up image files from a plugin.

Finally, return null to hide it from the task list. This is normally not very useful, but this can be used for actions that only contribute floatBox.jelly and no task list item. The other case where this is useful is to avoid showing links that require a privilege when the user is anonymous.

See Also:
Hudson.isAdmin()

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: Action
Gets the string to be displayed. The convention is to capitalize the first letter of each word, such as "Test Result".


getTags

public java.util.Map<SubversionSCM.SvnInfo,java.util.List<java.lang.String>> getTags()
See Also:
tags

isTagged

public boolean isTagged()
Returns true if this build has already been tagged at least once.

Specified by:
isTagged in class AbstractScmTagAction

getTooltip

public java.lang.String getTooltip()
Description copied from class: AbstractScmTagAction
This message is shown as the tool tip of the build badge icon.

Overrides:
getTooltip in class AbstractScmTagAction

makeTagURL

public java.lang.String makeTagURL(SubversionSCM.SvnInfo si)
Creates a URL, to be used as the default value of the module tag URL.

Returns:
null if failed to guess.

doSubmit

public void doSubmit(org.kohsuke.stapler.StaplerRequest req,
                     org.kohsuke.stapler.StaplerResponse rsp)
              throws java.io.IOException,
                     javax.servlet.ServletException
Invoked to actually tag the workspace.

Throws:
java.io.IOException
javax.servlet.ServletException

getPermission

public Permission getPermission()
Description copied from class: AbstractScmTagAction
Defaults to SCM.TAG.

Overrides:
getPermission in class AbstractScmTagAction


Copyright © 2009. All Rights Reserved.