Example usage for java.beans FeatureDescriptor setHidden

List of usage examples for java.beans FeatureDescriptor setHidden

Introduction

In this page you can find the example usage for java.beans FeatureDescriptor setHidden.

Prototype

public void setHidden(boolean hidden) 

Source Link

Document

The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.

Usage

From source file:org.jahia.services.content.JCRNodePropertiesELResolver.java

public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) {
    if (elContext == null) {
        throw new NullPointerException();
    }/*from   w w  w.  j  av a  2s . co  m*/
    if (base != null && base instanceof JCRNodeWrapper) {
        JCRNodeWrapper nodeWrapper = (JCRNodeWrapper) base;
        List<FeatureDescriptor> descriptors = new ArrayList<FeatureDescriptor>();
        try {
            final Set<String> propertyNames = nodeWrapper.getPropertiesAsString().keySet();
            FeatureDescriptor descriptor;
            for (String propertyName : propertyNames) {
                descriptor = new FeatureDescriptor();
                descriptor.setDisplayName(propertyName);
                descriptor.setName(propertyName);
                descriptor.setShortDescription("");
                descriptor.setExpert(false);
                descriptor.setHidden(false);
                descriptor.setPreferred(true);
                descriptor.setValue("type", String.class);
                descriptors.add(descriptor);
            }
        } catch (RepositoryException e) {
            logger.error(e.getMessage(), e);
        }
        return descriptors.iterator();
    } else {
        return null;
    }
}