de.smartics.properties.resource.domain
Class ArtifactId.Builder

Package class diagram package ArtifactId.Builder
java.lang.Object
  extended by de.smartics.properties.resource.domain.ArtifactId.Builder
Enclosing class:
ArtifactId

public static final class ArtifactId.Builder
     
     
extends Object

Builder to create instances of ArtifactId.


Constructor Summary
ArtifactId.Builder()
           
 
Method Summary
 ArtifactId build()
          Creates an instance of ArtifactId.
 ArtifactId.Builder withArchiveType(String archiveType)
          Sets the artifact type that is expressed by the artifact's file name extension.
 ArtifactId.Builder withClassifier(String classifier)
          Sets the classifier to the artifact.
 ArtifactId.Builder withGroupId(String groupId)
          Sets the group the artifact belongs to.
 ArtifactId.Builder withName(String name)
          Sets the name of the artifact.
 ArtifactId.Builder withVersion(String version)
          Sets the version of the artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactId.Builder

public ArtifactId.Builder()
Method Detail

withGroupId

public ArtifactId.Builder withGroupId(String groupId)
                               throws IllegalArgumentException
Sets the group the artifact belongs to.

Parameters:
groupId - the group the artifact belongs to.
Returns:
a reference to this builder instance.
Throws:
IllegalArgumentException - if groupId is blank.

withName

public ArtifactId.Builder withName(String name)
                            throws IllegalArgumentException
Sets the name of the artifact.

Parameters:
name - the name of the artifact.
Returns:
a reference to this builder instance.
Throws:
IllegalArgumentException - if name is blank.

withVersion

public ArtifactId.Builder withVersion(String version)
                               throws IllegalArgumentException
Sets the version of the artifact.

Parameters:
version - the version of the artifact.
Returns:
a reference to this builder instance.
Throws:
IllegalArgumentException - if version is blank.

withArchiveType

public ArtifactId.Builder withArchiveType(String archiveType)
                                   throws IllegalArgumentException
Sets the artifact type that is expressed by the artifact's file name extension.

Parameters:
archiveType - the artifact type that is expressed by the artifact's file name extension.
Returns:
a reference to this builder instance.
Throws:
IllegalArgumentException - if archiveType is blank.

withClassifier

public ArtifactId.Builder withClassifier(String classifier)
                                  throws IllegalArgumentException
Sets the classifier to the artifact.

Parameters:
classifier - the classifier to the artifact. May be null.
Returns:
a reference to this builder instance.
Throws:
IllegalArgumentException - if classifier is blank except null.

build

public ArtifactId build()
Creates an instance of ArtifactId.

Returns:
an instance.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.