Rename properties/excludeProperties to bpi/bpx.
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
index dcdd444..d4c1190 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/BeanConfigAnnotationTest.java
@@ -227,7 +227,7 @@
check("false", bc.isDebug());
check("false", bc.isDetectRecursions());
check("", bc.getExamples());
- check("", bc.getExcludeProperties());
+ check("", bc.getBpx());
check("false", bc.isFluentSetters());
check("false", bc.isIgnoreInvocationExceptionsOnGetters());
check("false", bc.isIgnoreInvocationExceptionsOnSetters());
@@ -236,7 +236,7 @@
check("false", bc.isIgnoreUnknownBeanProperties());
check("true", bc.isIgnoreUnknownNullBeanProperties());
check("", bc.getImplClasses());
- check("", bc.getIncludeProperties());
+ check("", bc.getBpi());
check("0", bc.getInitialDepth());
check(Locale.getDefault().toString(), bc.getLocale());
check("100", bc.getMaxDepth());
@@ -277,7 +277,7 @@
check("false", bc.isDebug());
check("false", bc.isDetectRecursions());
check("", bc.getExamples());
- check("", bc.getExcludeProperties());
+ check("", bc.getBpx());
check("false", bc.isFluentSetters());
check("false", bc.isIgnoreInvocationExceptionsOnGetters());
check("false", bc.isIgnoreInvocationExceptionsOnSetters());
@@ -286,7 +286,7 @@
check("false", bc.isIgnoreUnknownBeanProperties());
check("true", bc.isIgnoreUnknownNullBeanProperties());
check("", bc.getImplClasses());
- check("", bc.getIncludeProperties());
+ check("", bc.getBpi());
check("0", bc.getInitialDepth());
check(Locale.getDefault().toString(), bc.getLocale());
check("100", bc.getMaxDepth());
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index a0e7391..7541d8d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -416,7 +416,7 @@
*
* <jc>// Must provide a no-arg constructor!</jc>
* <jk>public</jk> MyBeanFilter() {
- * includeProperties(<js>"foo,bar,baz"</js>); <jc>// The properties we want exposed.</jc>
+ * bpi(<js>"foo,bar,baz"</js>); <jc>// The properties we want exposed.</jc>
* }
* }
*
@@ -976,8 +976,7 @@
*
* @deprecated Use {@link #BEAN_bpx}
*/
- @Deprecated
- public static final String BEAN_excludeProperties = BEAN_bpx;
+ @Deprecated public static final String BEAN_excludeProperties = BEAN_bpx;
/**
* Configuration property: Find fluent setters.
@@ -1263,8 +1262,7 @@
*
* @deprecated Use {@link #BEAN_bpi}
*/
- @Deprecated
- public static final String BEAN_includeProperties = BEAN_bpi;
+ @Deprecated public static final String BEAN_includeProperties = BEAN_bpi;
/**
* Configuration property: Locale.
@@ -2060,12 +2058,12 @@
implClasses = unmodifiableMap(icm);
Map<String,String[]> m2 = new HashMap<>();
- for (Map.Entry<String,String> e : getMapProperty(BEAN_includeProperties, String.class).entrySet())
+ for (Map.Entry<String,String> e : getMapProperty(BEAN_bpi, String.class).entrySet())
m2.put(e.getKey(), StringUtils.split(e.getValue()));
bpi = unmodifiableMap(m2);
m2 = new HashMap<>();
- for (Map.Entry<String,String> e : getMapProperty(BEAN_excludeProperties, String.class).entrySet())
+ for (Map.Entry<String,String> e : getMapProperty(BEAN_bpx, String.class).entrySet())
m2.put(e.getKey(), StringUtils.split(e.getValue()));
bpx = unmodifiableMap(m2);
@@ -2754,50 +2752,6 @@
}
/**
- * Returns the {@link #BEAN_includeProperties} setting for the specified class.
- *
- * @param c The class.
- * @return The properties to include for the specified class, or <jk>null</jk> if it's not defined for the class.
- */
- protected String[] getBpi(Class<?> c) {
- if (bpi.isEmpty())
- return null;
- String[] s = null;
- ClassInfo ci = ClassInfo.of(c);
- for (ClassInfo c2 : ci.getAllParents()) {
- s = bpi.get(c2.getFullName());
- if (s != null)
- return s;
- s = bpi.get(c2.getSimpleName());
- if (s != null)
- return s;
- }
- return bpi.get("*");
- }
-
- /**
- * Returns the {@link #BEAN_excludeProperties} setting for the specified class.
- *
- * @param c The class.
- * @return The properties to exclude for the specified class, or <jk>null</jk> if it's not defined for the class.
- */
- protected String[] getBpx(Class<?> c) {
- if (bpx.isEmpty())
- return null;
- String[] s = null;
- ClassInfo ci = ClassInfo.of(c);
- for (ClassInfo c2 : ci.getAllParents()) {
- s = bpx.get(c2.getFullName());
- if (s != null)
- return s;
- s = bpx.get(c2.getSimpleName());
- if (s != null)
- return s;
- }
- return bpx.get("*");
- }
-
- /**
* Returns a reusable {@link ClassMeta} representation for the class <c>Object</c>.
*
* <p>
@@ -2998,6 +2952,72 @@
}
/**
+ * Configuration property: Bean property includes.
+ *
+ * @see #BEAN_bpi
+ * @return
+ * Include properties keyed by class name.
+ */
+ protected final Map<String,String[]> getBpi() {
+ return bpi;
+ }
+
+ /**
+ * Returns the {@link #BEAN_bpi} setting for the specified class.
+ *
+ * @param c The class.
+ * @return The properties to include for the specified class, or <jk>null</jk> if it's not defined for the class.
+ */
+ protected String[] getBpi(Class<?> c) {
+ if (bpi.isEmpty())
+ return null;
+ String[] s = null;
+ ClassInfo ci = ClassInfo.of(c);
+ for (ClassInfo c2 : ci.getAllParents()) {
+ s = bpi.get(c2.getFullName());
+ if (s != null)
+ return s;
+ s = bpi.get(c2.getSimpleName());
+ if (s != null)
+ return s;
+ }
+ return bpi.get("*");
+ }
+
+ /**
+ * Configuration property: Bean property excludes.
+ *
+ * @see #BEAN_bpx
+ * @return
+ * The list of property names to exclude keyed by class name.
+ */
+ protected final Map<String,String[]> getBpx() {
+ return bpx;
+ }
+
+ /**
+ * Returns the {@link #BEAN_bpx} setting for the specified class.
+ *
+ * @param c The class.
+ * @return The properties to exclude for the specified class, or <jk>null</jk> if it's not defined for the class.
+ */
+ protected String[] getBpx(Class<?> c) {
+ if (bpx.isEmpty())
+ return null;
+ String[] s = null;
+ ClassInfo ci = ClassInfo.of(c);
+ for (ClassInfo c2 : ci.getAllParents()) {
+ s = bpx.get(c2.getFullName());
+ if (s != null)
+ return s;
+ s = bpx.get(c2.getSimpleName());
+ if (s != null)
+ return s;
+ }
+ return bpx.get("*");
+ }
+
+ /**
* Configuration property: Debug mode.
*
* @see #BEAN_debug
@@ -3020,17 +3040,6 @@
}
/**
- * Configuration property: Bean property excludes.
- *
- * @see #BEAN_excludeProperties
- * @return
- * The list of property names to exclude keyed by class name.
- */
- protected final Map<String,String[]> getExcludeProperties() {
- return bpx;
- }
-
- /**
* Configuration property: Find fluent setters.
*
* <h5 class='section'>Description:</h5>
@@ -3114,17 +3123,6 @@
}
/**
- * Configuration property: Bean property includes.
- *
- * @see #BEAN_includeProperties
- * @return
- * Include properties keyed by class name.
- */
- protected final Map<String,String[]> getIncludeProperties() {
- return bpi;
- }
-
- /**
* Configuration property: Locale.
*
* @see #BEAN_locale
@@ -3277,14 +3275,14 @@
.append("beansRequireSerializable", beansRequireSerializable)
.append("beansRequireSettersForGetters", beansRequireSettersForGetters)
.append("beansRequireSomeProperties", beansRequireSomeProperties)
- .append("excludeProperties", bpx)
+ .append("bpi", bpi)
+ .append("bpx", bpx)
.append("ignoreInvocationExceptionsOnGetters", ignoreInvocationExceptionsOnGetters)
.append("ignoreInvocationExceptionsOnSetters", ignoreInvocationExceptionsOnSetters)
.append("ignorePropertiesWithoutSetters", ignorePropertiesWithoutSetters)
.append("ignoreUnknownBeanProperties", ignoreUnknownBeanProperties)
.append("ignoreUnknownNullBeanProperties", ignoreUnknownNullBeanProperties)
.append("implClasses", implClasses)
- .append("includeProperties", bpi)
.append("locale", locale)
.append("mediaType", mediaType)
.append("notBeanClasses", notBeanClasses)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
index 1265158..f2a3590 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
@@ -944,60 +944,31 @@
/**
* Configuration property: Bean property excludes.
*
- * <p>
- * Specifies to exclude the specified list of properties for the specified bean class.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_excludeProperties}
- * </ul>
- *
- * @param beanClass The bean class.
- * @param properties Comma-delimited list of property names.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpx(Class, String)}
*/
- @Deprecated
- public BeanContextBuilder excludeProperties(Class<?> beanClass, String properties) {
- return addTo(BEAN_excludeProperties, beanClass.getName(), properties);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder excludeProperties(Class<?> beanClass, String properties) {
+ return addTo(BEAN_bpx, beanClass.getName(), properties);
}
/**
* Configuration property: Bean property excludes.
*
- * <p>
- * Specifies to exclude the specified list of properties for the specified bean classes.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_excludeProperties}
- * </ul>
- *
- * @param values
- * The new value for this property.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpx(Map)}
*/
- @Deprecated
- public BeanContextBuilder excludeProperties(Map<String,String> values) {
- return set(BEAN_excludeProperties, values);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder excludeProperties(Map<String,String> values) {
+ return set(BEAN_bpx, values);
}
/**
* Configuration property: Bean property excludes.
*
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_excludeProperties}
- * </ul>
- *
- * @param beanClassName
- * The bean class name.
- * <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all bean classes.
- * @param value Comma-delimited list of property names.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpx(String, String)}
*/
- @Deprecated
- public BeanContextBuilder excludeProperties(String beanClassName, String value) {
- return addTo(BEAN_excludeProperties, beanClassName, value);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder excludeProperties(String beanClassName, String value) {
+ return addTo(BEAN_bpx, beanClassName, value);
}
/**
@@ -1229,62 +1200,31 @@
/**
* Configuration property: Bean property includes.
*
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
- *
- * @param beanClass The bean class.
- * @param value Comma-delimited list of property names.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpi(Class, String)}
*/
- @Deprecated
- public BeanContextBuilder includeProperties(Class<?> beanClass, String value) {
- return addTo(BEAN_includeProperties, beanClass.getName(), value);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder includeProperties(Class<?> beanClass, String value) {
+ return addTo(BEAN_bpi, beanClass.getName(), value);
}
/**
* Configuration property: Bean property includes.
*
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
- *
- * @param values The new value for this property.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpi(Map)}
*/
- @Deprecated
- public BeanContextBuilder includeProperties(Map<String,String> values) {
- return set(BEAN_includeProperties, values);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder includeProperties(Map<String,String> values) {
+ return set(BEAN_bpi, values);
}
/**
* Configuration property: Bean property includes.
*
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
- *
- * @param beanClassName
- * The bean class name.
- * <br>Can be a simple name, fully-qualified name, or <js>"*"</js> for all beans.
- * @param value Comma-delimited list of property names.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpi(String, String)}
*/
- @Deprecated
- public BeanContextBuilder includeProperties(String beanClassName, String value) {
- return addTo(BEAN_includeProperties, beanClassName, value);
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanContextBuilder includeProperties(String beanClassName, String value) {
+ return addTo(BEAN_bpi, beanClassName, value);
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
index ab1b3f7..9f7aba9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
@@ -497,7 +497,7 @@
if (isNotEmpty(name)) {
if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))
return name;
- return null; // Could happen if filtered via BEAN_includeProperties/BEAN_excludeProperties.
+ return null; // Could happen if filtered via BEAN_bpi/BEAN_bpx.
}
name = propertyNamer.getPropertyName(f.getName());
if (fixedBeanProps.isEmpty() || fixedBeanProps.contains(name))
@@ -717,7 +717,7 @@
n = bpName;
if (! fixedBeanProps.isEmpty())
if (! fixedBeanProps.contains(n))
- n = null; // Could happen if filtered via BEAN_includeProperties/BEAN_excludeProperties
+ n = null; // Could happen if filtered via BEAN_bpi/BEAN_bpx
}
if (n != null)
l.add(new BeanMethod(n, methodType, m.inner()));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index 2429e5d..c8760f0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -1306,7 +1306,7 @@
* The list of property names to exclude keyed by class name.
*/
protected final Map<String,String[]> getBpx() {
- return ctx.getExcludeProperties();
+ return ctx.getBpx();
}
@@ -1401,7 +1401,7 @@
* Include properties keyed by class name.
*/
protected final Map<String,String[]> getBpi() {
- return ctx.getIncludeProperties();
+ return ctx.getBpi();
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
index d17317b..327aaa0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
@@ -118,8 +118,7 @@
*
* @deprecated Use {@link #bpx()}
*/
- @Deprecated
- String excludeProperties() default "";
+ @Deprecated String excludeProperties() default "";
/**
* Find fluent setters.
@@ -190,32 +189,9 @@
/**
* The set and order of names of properties associated with a bean class.
*
- * <p>
- * The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and
- * related methods.
- *
- * <p>
- * This value is entirely optional if you simply want to expose all the getters and public fields on
- * a class as bean properties.
- * <br>However, it's useful if you want certain getters to be ignored or you want the properties to be
- * serialized in a particular order.
- * <br>Note that on IBM JREs, the property order is the same as the order in the source code,
- * whereas on Oracle JREs, the order is entirely random.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bcode w800'>
- * <jc>// Address class with only street/city/state properties (in that order).</jc>
- * <ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
- * <jk>public class</jk> Address {...}
- * </p>
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
* @deprecated Use {@link #bpi()}
*/
- @Deprecated
- String properties() default "";
+ @Deprecated String properties() default "";
/**
* Property filter.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
index a21a00e..9897372 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
@@ -781,8 +781,7 @@
*
* @deprecated Use {@link #bpxMap()}
*/
- @Deprecated
- CS[] excludeProperties() default {};
+ @Deprecated CS[] excludeProperties() default {};
/**
* Configuration property: Find fluent setters.
@@ -974,37 +973,9 @@
/**
* Configuration property: Bean property includes.
*
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bcode w800'>
- * <ja>@BeanConfig</ja>(
- * includeProperties={
- * <ja>@CS</ja>(key=MyBean.<jk>class</jk>, value=<js>"foo,bar"</js>)
- * }
- * )
- * <p>
- *
- * <ul class='notes'>
- * <li>
- * Keys are the class applied to.
- * <br>Values are comma-delimited lists of property names.
- * <li>
- * Setting applies to specified class and all subclasses.
- * <li>
- * Supports {@doc DefaultSvlVariables} (e.g. <js>"$C{myConfigVar}"</js>).
- * <li>
- * A default global value can be set via the system property <js>"BeanContext.properties.sms"</js>.
- * </ul>
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
* @deprecated Use {@link #bpiMap()}
*/
- @Deprecated
- CS[] includeProperties() default {};
+ @Deprecated CS[] includeProperties() default {};
/**
* Configuration property: Locale.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
index efcf68f..33f6213 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
@@ -82,9 +82,9 @@
if (! a.beanTypePropertyName().isEmpty())
psb.set(BEAN_beanTypePropertyName, string(a.beanTypePropertyName()));
if (a.bpi().length > 0)
- psb.addTo(BEAN_includeProperties, stringsMap(a.bpi(), "bpi"));
+ psb.addTo(BEAN_bpi, stringsMap(a.bpi(), "bpi"));
if (a.bpx().length > 0)
- psb.addTo(BEAN_excludeProperties, stringsMap(a.bpi(), "bpx"));
+ psb.addTo(BEAN_bpx, stringsMap(a.bpi(), "bpx"));
if (! a.debug().isEmpty())
psb.set(BEAN_debug, bool(a.debug()));
for (CS e : a.example())
@@ -92,9 +92,9 @@
if (a.examples().length > 0)
psb.addTo(BEAN_examples, objectMap(a.examples(), "examples"));
for (CS e : a.excludeProperties())
- psb.addTo(BEAN_excludeProperties, e.k().getName(), string(e.v()));
+ psb.addTo(BEAN_bpx, e.k().getName(), string(e.v()));
for (CS e : a.bpxMap())
- psb.addTo(BEAN_excludeProperties, e.k().getName(), string(e.v()));
+ psb.addTo(BEAN_bpx, e.k().getName(), string(e.v()));
if (! a.fluentSetters().isEmpty())
psb.set(BEAN_fluentSetters, bool(a.fluentSetters()));
if (! a.ignoreInvocationExceptionsOnGetters().isEmpty())
@@ -110,9 +110,9 @@
for (CC e : a.implClasses())
psb.addTo(BEAN_implClasses, e.k().getName(), e.v());
for (CS e : a.includeProperties())
- psb.addTo(BEAN_includeProperties, e.k().getName(), string(e.v()));
+ psb.addTo(BEAN_bpi, e.k().getName(), string(e.v()));
for (CS e : a.bpiMap())
- psb.addTo(BEAN_includeProperties, e.k().getName(), string(e.v()));
+ psb.addTo(BEAN_bpi, e.k().getName(), string(e.v()));
if (! a.locale().isEmpty())
psb.set(BEAN_locale, locale(a.locale()));
if (! a.mediaType().isEmpty())
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
index d7e5e96..56c059c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/transform/BeanFilterBuilder.java
@@ -35,7 +35,7 @@
* <jk>public</jk> MyFilter() {
*
* <jc>// Call one or more configuration methods.</jc>
- * includeProperties(<js>"foo,bar,baz"</js>);
+ * bpi(<js>"foo,bar,baz"</js>);
* sortProperties();
* propertyNamer(PropertyNamerULC.<jk>class</jk>);
* }
@@ -124,41 +124,10 @@
/**
* Configuration property: Bean property includes.
*
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bcode w800'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> BeanFilterBuilder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * includeProperties(<js>"foo,bar,baz"</js>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer s = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Only serializes the properties 'foo', 'bar', and 'baz'.</jc>
- * String json = s.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <ul class='seealso'>
- * <li class='ja'>{@link Bean#bpi()}
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>Values can contain comma-delimited list of property names.
- * @return This object (for method chaining).
* @deprecated Use {@link #bpi(String...)}
*/
- @Deprecated
- public BeanFilterBuilder<T> properties(String...value) {
+ @SuppressWarnings("javadoc")
+ @Deprecated public BeanFilterBuilder<T> properties(String...value) {
this.bpi = value;
return this;
}
@@ -169,8 +138,7 @@
* @deprecated Use {@link #bpx(String...)}
*/
@SuppressWarnings("javadoc")
- @Deprecated
- public BeanFilterBuilder<T> excludeProperties(String...value) {
+ @Deprecated public BeanFilterBuilder<T> excludeProperties(String...value) {
this.bpx = value;
return this;
}
diff --git a/juneau-doc/docs/ReleaseNotes/6.3.0.html b/juneau-doc/docs/ReleaseNotes/6.3.0.html
index 527694f..63f7871 100644
--- a/juneau-doc/docs/ReleaseNotes/6.3.0.html
+++ b/juneau-doc/docs/ReleaseNotes/6.3.0.html
@@ -168,8 +168,8 @@
can now be applied to fields.
<li>New properties on {@link oaj.BeanContext}:
<ul>
- <li>{@link oaj.BeanContext#BEAN_includeProperties BEAN_includeProperties}
- <li>{@link oaj.BeanContext#BEAN_excludeProperties BEAN_excludeProperties}
+ <li><dc>BEAN_includeProperties</dc>
+ <li><dc>BEAN_excludeProperties</dc>
</ul>
<li>New annotation property: <dc>@BeanProperty(format)</dc>.
</ul>
diff --git a/juneau-doc/docs/ReleaseNotes/6.3.1.html b/juneau-doc/docs/ReleaseNotes/6.3.1.html
index 5118014..043c597 100644
--- a/juneau-doc/docs/ReleaseNotes/6.3.1.html
+++ b/juneau-doc/docs/ReleaseNotes/6.3.1.html
@@ -27,7 +27,7 @@
New <dc>RemoteMethod.returns()</dc> annotation.
<br>Allows you to specify whether the remote method returns the HTTP body or status code.
<li>
- Fixed bugs with {@link oaj.BeanContext#BEAN_includeProperties} and {@link oaj.BeanContext#BEAN_excludeProperties} settings.
+ Fixed bugs with <dc>BEAN_includeProperties</dc> and <dc>BEAN_excludeProperties</dc> settings.
<li>
New/modified settings in <dc>HtmlDocSerializerContext</dc>:
<ul>
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/06.ConfigurableProperties/01.Common.html b/juneau-doc/docs/Topics/02.juneau-marshall/06.ConfigurableProperties/01.Common.html
index 82ad06c..87b429c 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/06.ConfigurableProperties/01.Common.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/06.ConfigurableProperties/01.Common.html
@@ -34,9 +34,10 @@
<li class='jf'>{@link oaj.BeanContext#BEAN_beansRequireSettersForGetters BEAN_beansRequireSettersForGetters}
<li class='jf'>{@link oaj.BeanContext#BEAN_beansRequireSomeProperties BEAN_beansRequireSomeProperties}
<li class='jf'>{@link oaj.BeanContext#BEAN_beanTypePropertyName BEAN_beanTypePropertyName}
+ <li class='jf'>{@link oaj.BeanContext#BEAN_bpi BEAN_bpi}
+ <li class='jf'>{@link oaj.BeanContext#BEAN_bpx BEAN_bpx}
<li class='jf'>{@link oaj.BeanContext#BEAN_debug BEAN_debug}
<li class='jf'>{@link oaj.BeanContext#BEAN_examples BEAN_examples}
- <li class='jf'>{@link oaj.BeanContext#BEAN_excludeProperties BEAN_excludeProperties}
<li class='jf'>{@link oaj.BeanContext#BEAN_fluentSetters BEAN_fluentSetters}
<li class='jf'>{@link oaj.BeanContext#BEAN_ignoreInvocationExceptionsOnGetters BEAN_ignoreInvocationExceptionsOnGetters}
<li class='jf'>{@link oaj.BeanContext#BEAN_ignoreInvocationExceptionsOnSetters BEAN_ignoreInvocationExceptionsOnSetters}
@@ -44,7 +45,6 @@
<li class='jf'>{@link oaj.BeanContext#BEAN_ignoreUnknownBeanProperties BEAN_ignoreUnknownBeanProperties}
<li class='jf'>{@link oaj.BeanContext#BEAN_ignoreUnknownNullBeanProperties BEAN_ignoreUnknownNullBeanProperties}
<li class='jf'>{@link oaj.BeanContext#BEAN_implClasses BEAN_implClasses}
- <li class='jf'>{@link oaj.BeanContext#BEAN_includeProperties BEAN_includeProperties}
<li class='jf'>{@link oaj.BeanContext#BEAN_locale BEAN_locale}
<li class='jf'>{@link oaj.BeanContext#BEAN_mediaType BEAN_mediaType}
<li class='jf'>{@link oaj.BeanContext#BEAN_notBeanClasses BEAN_notBeanClasses}
diff --git a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/16.BeanFilters.html b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/16.BeanFilters.html
index ad35363..42ad1e9 100644
--- a/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/16.BeanFilters.html
+++ b/juneau-doc/docs/Topics/02.juneau-marshall/11.Transforms/16.BeanFilters.html
@@ -32,7 +32,7 @@
In the previous examples, we defined this bean annotation:
</p>
<p class='bpcode w800'>
- <ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
+ <ja>@Bean</ja>(bpi=<js>"street,city,state"</js>)
<jk>public class</jk> Address { ... }
</p>
<p>
@@ -43,7 +43,7 @@
<jc>// Must provide a no-arg constructor!</jc>
<jk>public</jk> AddressFilter() {
- includeProperties(<js>"street,city,state"</js>); <jc>// The properties we want exposed.</jc>
+ bpi(<js>"street,city,state"</js>); <jc>// The properties we want exposed.</jc>
}
}
</p>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
index 47f76d7..85243f2 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
@@ -81,123 +81,21 @@
*
* @deprecated Use {@link BeanConfig#beanFilters()}
*/
- @Deprecated
- Class<?>[] beanFilters() default {};
+ @Deprecated Class<?>[] beanFilters() default {};
/**
- * Shortcut for specifying the {@link BeanContext#BEAN_includeProperties} property on all serializers.
- *
- * <p>
- * The typical use case is when you're rendering summary and details views of the same bean in a resource and
- * you want to expose or hide specific properties depending on the level of detail you want.
- *
- * <p>
- * In the example below, our 'summary' view is a list of beans where we only want to show the ID property,
- * and our detail view is a single bean where we want to expose different fields:
- * <p class='bcode w800'>
- * <jc>// Our bean</jc>
- * <jk>public class</jk> MyBean {
- *
- * <jc>// Summary properties</jc>
- * <ja>@Html</ja>(link=<js>"servlet:/mybeans/{id}"</js>)
- * <jk>public</jk> String <jf>id</jf>;
- *
- * <jc>// Detail properties</jc>
- * <jk>public</jk> String <jf>a</jf>, <jf>b</jf>;
- * }
- *
- * <jc>// Only render "id" property.</jc>
- * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans"</js>, bpi=<js>"MyBean: id"</js>)
- * <jk>public</jk> List<MyBean> getBeanSummary() {...}
- *
- * <jc>// Only render "a" and "b" properties.</jc>
- * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans/{id}"</js>, bpi=<js>"MyBean: a,b"</js>)
- * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id) {...}
- * </p>
- *
- * <ul class='notes'>
- * <li>
- * The format of each value is: <js>"Key: comma-delimited-tokens"</js>.
- * <li>
- * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
- * <li>
- * Values are comma-delimited lists of bean property names.
- * <li>
- * Properties apply to specified class and all subclasses.
- * <li>
- * Semicolons can be used as an additional separator for multiple values:
- * <p class='bcode w800'>
- * <jc>// Equivalent</jc>
- * bpi={<js>"Bean1: foo"</js>,<js>"Bean2: bar,baz"</js>}
- * bpi=<js>"Bean1: foo; Bean2: bar,baz"</js>
- * </p>
- * </ul>
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_includeProperties}
- * </ul>
+ * Shortcut for specifying the {@link BeanContext#BEAN_bpi} property on all serializers.
*
* @deprecated Use {@link BeanConfig#bpi()}
*/
- @Deprecated
- String[] bpi() default {};
+ @Deprecated String[] bpi() default {};
/**
- * Shortcut for specifying the {@link BeanContext#BEAN_excludeProperties} property on all serializers.
- *
- * <p>
- * Same as {@link #bpi()} except you specify a list of bean property names that you want to exclude from
- * serialization.
- *
- * <p>
- * In the example below, our 'summary' view is a list of beans where we want to exclude some properties:
- * <p class='bcode w800'>
- * <jc>// Our bean</jc>
- * <jk>public class</jk> MyBean {
- *
- * <jc>// Summary properties</jc>
- * <ja>@Html</ja>(link=<js>"servlet:/mybeans/{id}"</js>)
- * <jk>public</jk> String <jf>id</jf>;
- *
- * <jc>// Detail properties</jc>
- * <jk>public</jk> String <jf>a</jf>, <jf>b</jf>;
- * }
- *
- * <jc>// Don't show "a" and "b" properties.</jc>
- * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans"</js>, bpx=<js>"MyBean: a,b"</js>)
- * <jk>public</jk> List<MyBean> getBeanSummary() {...}
- *
- * <jc>// Render all properties.</jc>
- * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/mybeans/{id}"</js>)
- * <jk>public</jk> MyBean getBeanDetails(<ja>@Path</ja> String id) {...}
- * </p>
- *
- * <ul class='notes'>
- * <li>
- * The format of each value is: <js>"Key: comma-delimited-tokens"</js>.
- * <li>
- * Keys can be fully-qualified or short class names or <js>"*"</js> to represent all classes.
- * <li>
- * Values are comma-delimited lists of bean property names.
- * <li>
- * Properties apply to specified class and all subclasses.
- * <li>
- * Semicolons can be used as an additional separator for multiple values:
- * <p class='bcode w800'>
- * <jc>// Equivalent</jc>
- * bpx={<js>"Bean1: foo"</js>,<js>"Bean2: bar,baz"</js>}
- * bpx=<js>"Bean1: foo; Bean2: bar,baz"</js>
- * </p>
- * </ul>
- *
- * <ul class='seealso'>
- * <li class='jf'>{@link BeanContext#BEAN_excludeProperties}
- * </ul>
+ * Shortcut for specifying the {@link BeanContext#BEAN_bpx} property on all serializers.
*
* @deprecated Use {@link BeanConfig#bpx()}
*/
- @Deprecated
- String[] bpx() default {};
+ @Deprecated String[] bpx() default {};
/**
* Specifies whether this method can be called based on the client version.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
index df7f460..eb43cff 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethodConfigApply.java
@@ -124,7 +124,7 @@
bpiMap.put(s2.substring(0, i).trim(), s2.substring(i+1).trim());
}
}
- psb.addTo(BEAN_includeProperties, bpiMap);
+ psb.addTo(BEAN_bpi, bpiMap);
}
if (a.bpx().length > 0) {
@@ -138,7 +138,7 @@
bpxMap.put(s2.substring(0, i).trim(), s2.substring(i+1).trim());
}
}
- psb.addTo(BEAN_excludeProperties, bpxMap);
+ psb.addTo(BEAN_bpx, bpxMap);
}
if (! a.defaultCharset().isEmpty())