Skip to content

Commit

Permalink
Fixed exclusion of properties with @HiddenProperty annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspersorensen committed May 19, 2015
1 parent e2c6e63 commit e8c793d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
3 changes: 0 additions & 3 deletions api/src/main/java/org/datacleaner/api/ColumnProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.inject.Qualifier;

import org.apache.metamodel.schema.Column;

/**
Expand All @@ -40,7 +38,6 @@
@Target({ ElementType.FIELD })
@Documented
@Inherited
@Qualifier
public @interface ColumnProperty {

/**
Expand Down
3 changes: 0 additions & 3 deletions api/src/main/java/org/datacleaner/api/MappedProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.inject.Qualifier;

/**
* Annotation used for {@link Configured} properties that are mapped to another
* {@link Configured} property.
Expand All @@ -47,7 +45,6 @@
@Target({ ElementType.FIELD })
@Documented
@Inherited
@Qualifier
public @interface MappedProperty {

/**
Expand Down
3 changes: 0 additions & 3 deletions api/src/main/java/org/datacleaner/api/NumberProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.inject.Qualifier;

/**
* Annotation containing supplementary metadata about a number property. This
* metadata can be used as a way to give hints to the UI as to how the content
Expand All @@ -37,7 +35,6 @@
@Target({ ElementType.FIELD })
@Documented
@Inherited
@Qualifier
public @interface NumberProperty {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.inject.Qualifier;

import org.datacleaner.api.Configured;

/**
Expand All @@ -41,7 +39,6 @@
@Target({ ElementType.FIELD })
@Documented
@Inherited
@Qualifier
public @interface HiddenProperty {

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.datacleaner.api.Component;
import org.datacleaner.descriptors.ComponentDescriptor;
import org.datacleaner.descriptors.ConfiguredPropertyDescriptor;
import org.datacleaner.desktop.api.HiddenProperty;
import org.datacleaner.util.IconUtils;

import freemarker.cache.ClassTemplateLoader;
Expand Down Expand Up @@ -109,9 +110,13 @@ public void write(ComponentDescriptor<?> componentDescriptor, OutputStream outpu
configuredProperties);
final List<ConfiguredPropertyDocumentationWrapper> propertyList = new ArrayList<>();
for (ConfiguredPropertyDescriptor property : properties) {
ConfiguredPropertyDocumentationWrapper wrapper = new ConfiguredPropertyDocumentationWrapper(
property);
propertyList.add(wrapper);
final HiddenProperty hiddenProperty = property.getAnnotation(HiddenProperty.class);
// we do not show hidden properties in docs
if (hiddenProperty == null) {
ConfiguredPropertyDocumentationWrapper wrapper = new ConfiguredPropertyDocumentationWrapper(
property);
propertyList.add(wrapper);
}
}

data.put("properties", propertyList);
Expand Down

0 comments on commit e8c793d

Please sign in to comment.