hudson.plugins.persona.xml
Class XmlBasedPersona

java.lang.Object
  extended by hudson.plugins.persona.Persona
      extended by hudson.plugins.persona.simple.SimplePersona
          extended by hudson.plugins.persona.xml.XmlBasedPersona
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.ModelObject

public class XmlBasedPersona
extends SimplePersona

SimplePersona implementation based on XML file.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.plugins.persona.Persona
Persona.ConverterImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 URL xml
           
 
Fields inherited from class hudson.plugins.persona.Persona
id
 
Method Summary
static XmlBasedPersona create(URL xml, URL imageBase, String imageBasePath)
          Parses a persona from an XML file.
 Image getDefaultImage()
           
 String getDisplayName()
           
 Image getImage(hudson.model.AbstractBuild<?,?> build)
          Determines the icon and the background to render.
 void reload()
          Reloads the configuration of this persona from its original XML.
 
Methods inherited from class hudson.plugins.persona.simple.SimplePersona
generateProjectQuote, generateQuote, getRandomQuoteText, setQuotes
 
Methods inherited from class hudson.plugins.persona.Persona
all, byId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xml

public final URL xml
Method Detail

create

public static XmlBasedPersona create(URL xml,
                                     URL imageBase,
                                     String imageBasePath)
                              throws org.dom4j.DocumentException,
                                     IOException
Parses a persona from an XML file.

Parameters:
xml - Location of the XML file.
imageBase - Base URL to find images like icon.png, success.jpg, and so on.
Throws:
org.dom4j.DocumentException
IOException

reload

public void reload()
            throws IOException,
                   org.dom4j.DocumentException
Reloads the configuration of this persona from its original XML.

Throws:
IOException
org.dom4j.DocumentException

getImage

public Image getImage(hudson.model.AbstractBuild<?,?> build)
Description copied from class: SimplePersona
Determines the icon and the background to render.

Specified by:
getImage in class SimplePersona

getDefaultImage

public Image getDefaultImage()
Specified by:
getDefaultImage in class SimplePersona

getDisplayName

public String getDisplayName()


Copyright © 2004-2011. All Rights Reserved.