org.hudsonci.utils.tasks
Class MetaProject

java.lang.Object
  extended by org.hudsonci.utils.tasks.MetaProject

public class MetaProject
extends Object

Provides a unified interface for AbstractProject types. Avoiding generic types where possible to avoid evil "inconvertible types" due to capture### crap.

Since:
2.1.0
Author:
Jason Dillon

Nested Class Summary
static interface MetaProject.Filter
           
static class MetaProject.Type
           
 
Constructor Summary
MetaProject(AbstractProject project)
           
 
Method Summary
 void addProperty(JobProperty item)
           
 void addTrigger(Trigger item)
           
 MatrixProject asMultiConfig()
          Typed access to project instance as a multi-config MatrixProject.
 Project<?,?> asNormal()
          Typed access to project instance as a normal Project.
 void checkPermission(Permission perm)
           
 boolean equals(Object obj)
           
static MetaProject find(String id)
           
static MetaProject find(UUID id)
           
 Collection<Builder> getBuilders()
           
 DescribableList<Builder,Descriptor<Builder>> getBuildersList()
           
 Collection<BuildWrapper> getBuildWrappers()
           
 DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
           
 AbstractProject getDelegate()
           
 String getDisplayName()
           
 String getFullDisplayName()
           
 String getFullName()
           
 UUID getId()
           
 String getName()
           
 ItemGroup getParent()
           
 Collection<JobProperty> getProperties()
           
 Collection<Publisher> getPublishers()
           
 DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
           
 Collection<Trigger> getTriggers()
           
 MetaProject.Type getType()
           
 int hashCode()
           
 boolean isEnabled()
           
 boolean isMultiConfig()
           
 boolean isNormal()
           
 boolean isSupported()
           
static Collection<MetaProject> list()
           
static Collection<MetaProject> list(MetaProject.Filter filter)
           
 void setEnabled(boolean enabled)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaProject

public MetaProject(AbstractProject project)
Method Detail

getDelegate

public AbstractProject getDelegate()

getType

public MetaProject.Type getType()

isSupported

public boolean isSupported()

isNormal

public boolean isNormal()

isMultiConfig

public boolean isMultiConfig()

toString

public String toString()
Overrides:
toString in class Object

asNormal

public Project<?,?> asNormal()
Typed access to project instance as a normal Project.


asMultiConfig

public MatrixProject asMultiConfig()
Typed access to project instance as a multi-config MatrixProject.


getParent

public ItemGroup getParent()

getName

public String getName()

getFullName

public String getFullName()

getDisplayName

public String getDisplayName()

getFullDisplayName

public String getFullDisplayName()

getId

public UUID getId()

setEnabled

public void setEnabled(boolean enabled)
                throws IOException
Throws:
IOException

isEnabled

public boolean isEnabled()

getProperties

public Collection<JobProperty> getProperties()

addProperty

public void addProperty(JobProperty item)
                 throws IOException
Throws:
IOException

getTriggers

public Collection<Trigger> getTriggers()

addTrigger

public void addTrigger(Trigger item)
                throws IOException
Throws:
IOException

getBuildWrappersList

public DescribableList<BuildWrapper,Descriptor<BuildWrapper>> getBuildWrappersList()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

getBuildWrappers

public Collection<BuildWrapper> getBuildWrappers()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

getBuildersList

public DescribableList<Builder,Descriptor<Builder>> getBuildersList()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

getBuilders

public Collection<Builder> getBuilders()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

getPublishersList

public DescribableList<Publisher,Descriptor<Publisher>> getPublishersList()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

getPublishers

public Collection<Publisher> getPublishers()
Throws:
UnsupportedProjectException - if the Project type is MetaProject.Type.UNSUPPORTED.

checkPermission

public void checkPermission(Permission perm)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

list

public static Collection<MetaProject> list(MetaProject.Filter filter)

list

public static Collection<MetaProject> list()

find

public static MetaProject find(UUID id)

find

public static MetaProject find(String id)


Copyright © 2004-2011 Hudson. All Rights Reserved.