org.codehaus.mojo.license.header
Class FileHeader

java.lang.Object
  extended by org.codehaus.mojo.license.header.FileHeader

public class FileHeader
extends Object

Contract of a file header.

A header has three sections like in this example :

 Description
 %--
 Copyright (C) firstYear[ - lastYear] holder
 %--
 License
 

Since:
1.0
Author:
tchemit

Field Summary
protected static String COPYRIGHT_TO_STRING_FORMAT
          Copyright to string format
protected  Integer copyrightFirstYear
          Copyright first year of application
protected  String copyrightHolder
          Copyright holder
protected  Integer copyrightLastYear
          Copyright last year of application (can be nullif copyright is only on one year).
protected  String description
          Description of the project or module to add in header
protected  String license
          License used in the header.
 
Constructor Summary
FileHeader()
           
 
Method Summary
 String getCopyright()
          Produces a string representation of the copyright.
 Integer getCopyrightFirstYear()
           
 String getCopyrightHolder()
           
 Integer getCopyrightLastYear()
           
 String getDescription()
           
 String getLicense()
           
 void setCopyrightFirstYear(Integer copyrightFirstYear)
           
 void setCopyrightHolder(String copyrightHolder)
           
 void setCopyrightLastYear(Integer copyrightLastYear)
           
 void setDescription(String description)
           
 void setLicense(String license)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_TO_STRING_FORMAT

protected static final String COPYRIGHT_TO_STRING_FORMAT
Copyright to string format

See Also:
Constant Field Values

description

protected String description
Description of the project or module to add in header


copyrightHolder

protected String copyrightHolder
Copyright holder


copyrightFirstYear

protected Integer copyrightFirstYear
Copyright first year of application


copyrightLastYear

protected Integer copyrightLastYear
Copyright last year of application (can be nullif copyright is only on one year).


license

protected String license
License used in the header.

Constructor Detail

FileHeader

public FileHeader()
Method Detail

getDescription

public String getDescription()
Returns:
the project name, or nay other common informations for all files of a project (or module)

getCopyrightHolder

public String getCopyrightHolder()
Returns:
the copyright holder

getCopyrightFirstYear

public Integer getCopyrightFirstYear()
Returns:
the first year of the copyright

getCopyrightLastYear

public Integer getCopyrightLastYear()
Returns:
the last year of the copyright (if copyright affects only one year, can be equals to the getCopyrightFirstYear()).

getCopyright

public String getCopyright()
Produces a string representation of the copyright.

If copyright acts on one year :

 Copyright (C) 2010 Holder
 

If copyright acts on more than one year :

 Copyright (C) 2010 - 2012 Holder
 

Returns:
the String representation of the copyright

getLicense

public String getLicense()
Returns:
the license content (this is not the fully license content, but just a per file license resume)

setDescription

public void setDescription(String description)

setCopyrightHolder

public void setCopyrightHolder(String copyrightHolder)

setCopyrightFirstYear

public void setCopyrightFirstYear(Integer copyrightFirstYear)

setCopyrightLastYear

public void setCopyrightLastYear(Integer copyrightLastYear)

setLicense

public void setLicense(String license)


Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.