forked from datacleaner/DataCleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue datacleaner#395: Added @ExternalDocumentation annotation and pu…
…t video links to various components
- Loading branch information
1 parent
f0ea2ee
commit 8c6ea63
Showing
8 changed files
with
274 additions
and
146 deletions.
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
api/src/main/java/org/datacleaner/api/ExternalDocumentation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/** | ||
* DataCleaner (community edition) | ||
* Copyright (C) 2014 Neopost - Customer Information Management | ||
* | ||
* This copyrighted material is made available to anyone wishing to use, modify, | ||
* copy, or redistribute it subject to the terms and conditions of the GNU | ||
* Lesser General Public License, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this distribution; if not, write to: | ||
* Free Software Foundation, Inc. | ||
* 51 Franklin Street, Fifth Floor | ||
* Boston, MA 02110-1301 USA | ||
*/ | ||
package org.datacleaner.api; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Annotation used to provide links to extra documentation (beyond | ||
* {@link Description} and similar annotations) about a {@link Component}. | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD }) | ||
@Documented | ||
@Inherited | ||
public @interface ExternalDocumentation { | ||
|
||
/** | ||
* Defines the types of {@link DocumentationLink}s that are available | ||
*/ | ||
public static enum DocumentationType { | ||
|
||
/** | ||
* Written reference documentation style documents. | ||
*/ | ||
REFERENCE, | ||
|
||
/** | ||
* Tutorials/use-cases that are explained to put the component in a | ||
* particular light. | ||
*/ | ||
TUTORIAL, | ||
|
||
/** | ||
* An video explaining the component. | ||
*/ | ||
VIDEO, | ||
|
||
/** | ||
* A technical background piece, typically for engineers or people with | ||
* a specialized interest in this component. | ||
*/ | ||
TECH | ||
} | ||
|
||
public static @interface DocumentationLink { | ||
|
||
/** | ||
* Gets the title/name of the documentation item. | ||
* | ||
* @return | ||
*/ | ||
public String title(); | ||
|
||
/** | ||
* Gets the HTTP(S) URL that this documentation item resides at | ||
* | ||
* @return | ||
*/ | ||
public String url(); | ||
|
||
/** | ||
* Gets the {@link DocumentationType} of this link | ||
* | ||
* @return | ||
*/ | ||
public DocumentationType type(); | ||
|
||
/** | ||
* Defines the version of DataCleaner that this documentation item was | ||
* based on | ||
* | ||
* @return | ||
*/ | ||
public String version(); | ||
} | ||
|
||
/** | ||
* Defines the external documentation links that are defined for this | ||
* component. | ||
* | ||
* @return | ||
*/ | ||
public DocumentationLink[] value(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.