hudson.plugins.persona.simple
Class SimplePersona

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

public abstract class SimplePersona
extends Persona

Partial implementation of Persona that renders the plain text quote with an icon.

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
 
Fields inherited from class hudson.plugins.persona.Persona
id
 
Constructor Summary
protected SimplePersona(java.lang.String id, java.util.List<java.lang.String> quotes)
           
 
Method Summary
 Quote generateProjectQuote(hudson.model.AbstractProject<?,?> project)
          Generates a random quote for the project top page.
 Quote generateQuote(hudson.model.AbstractBuild<?,?> build)
          Generates a random quote for the given build.
abstract  Image getDefaultImage()
           
abstract  Image getImage(hudson.model.AbstractBuild<?,?> build)
          Determines the icon and the background to render.
 java.lang.String getRandomQuoteText()
           
 
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
 
Methods inherited from interface hudson.model.ModelObject
getDisplayName
 

Constructor Detail

SimplePersona

protected SimplePersona(java.lang.String id,
                        java.util.List<java.lang.String> quotes)
Parameters:
id - Unique identifier of this persona.
quotes - Collection of quotes.
Method Detail

getImage

public abstract Image getImage(hudson.model.AbstractBuild<?,?> build)
Determines the icon and the background to render.


getDefaultImage

public abstract Image getDefaultImage()

generateQuote

public Quote generateQuote(hudson.model.AbstractBuild<?,?> build)
Description copied from class: Persona
Generates a random quote for the given build.

Specified by:
generateQuote in class Persona
See Also:
AbstractQuoteImpl

getRandomQuoteText

public java.lang.String getRandomQuoteText()

generateProjectQuote

public Quote generateProjectQuote(hudson.model.AbstractProject<?,?> project)
Description copied from class: Persona
Generates a random quote for the project top page.

Specified by:
generateProjectQuote in class Persona
See Also:
AbstractQuoteImpl


Copyright © 2010. All Rights Reserved.