Package org.geoserver.ows.util

Examples of org.geoserver.ows.util.ClassProperties.properties()


    /**
     * Method which reflectively sets all collections when they are null.
     */
    protected void resolveCollections(Object object) {
        ClassProperties properties = OwsUtils.getClassProperties(object.getClass());
        for (String property : properties.properties()) {
            Method g = properties.getter(property, null);
            if (g == null) {
                continue;
            }

View Full Code Here


           
            if ( object != null && clazz.isAssignableFrom( object.getClass() ) ) {
                HashMap map = new HashMap();
               
                ClassProperties cp = OwsUtils.getClassProperties(clazz);
                for ( String p : cp.properties() ) {
                    if ( "Class".equals( p ) ) continue;
                    Object value = OwsUtils.get(object, p);
                    if ( value == null ) {
                        value = "null";
                    }
View Full Code Here

    /**
     * Method which reflectively sets all collections when they are null.
     */
    protected void resolveCollections(Object object) {
        ClassProperties properties = OwsUtils.getClassProperties( object.getClass() );
        for ( String property : properties.properties() ) {
            Method g = properties.getter( property, null );
            if ( g == null ) {
                continue;
            }
           
View Full Code Here

     * Null values from the <tt>update</tt> object are ignored.
     * </p>
     */
    <T> void update( T original, T update, Class<T> clazz ) {
        ClassProperties properties = OwsUtils.getClassProperties( clazz );
        for ( String p : properties.properties() ) {
            Method getter = properties.getter( p, null );
            if ( getter == null ) {
                continue; // should not really happen
            }
           
View Full Code Here

           
            if ( object != null && clazz.isAssignableFrom( object.getClass() ) ) {
                HashMap map = new HashMap();
               
                ClassProperties cp = OwsUtils.getClassProperties(clazz);
                for ( String p : cp.properties() ) {
                    if ( "Class".equals( p ) ) continue;
                    Object value = OwsUtils.get(object, p);
                    if ( value == null ) {
                        value = "null";
                    }
View Full Code Here

            // Doing this reflectively so that if LoggingInfo gets new properties, this should still
            // work. KS
           
            ClassProperties properties = OwsUtils.getClassProperties(LoggingInfo.class);
           
            List<String> propertyNames = new ArrayList<String>(properties.properties().size());
            List<Object> newValues = new ArrayList<Object>(properties.properties().size());
            List<Object> oldValues = new ArrayList<Object>(properties.properties().size());
           
            final Level propertyTableLevel = Level.FINE;
            LOGGER.log(propertyTableLevel, "Checking Logging configuration in case it neeeds to be reinitialized");
View Full Code Here

            // work. KS
           
            ClassProperties properties = OwsUtils.getClassProperties(LoggingInfo.class);
           
            List<String> propertyNames = new ArrayList<String>(properties.properties().size());
            List<Object> newValues = new ArrayList<Object>(properties.properties().size());
            List<Object> oldValues = new ArrayList<Object>(properties.properties().size());
           
            final Level propertyTableLevel = Level.FINE;
            LOGGER.log(propertyTableLevel, "Checking Logging configuration in case it neeeds to be reinitialized");
            for (String propName : properties.properties()) {
View Full Code Here

           
            ClassProperties properties = OwsUtils.getClassProperties(LoggingInfo.class);
           
            List<String> propertyNames = new ArrayList<String>(properties.properties().size());
            List<Object> newValues = new ArrayList<Object>(properties.properties().size());
            List<Object> oldValues = new ArrayList<Object>(properties.properties().size());
           
            final Level propertyTableLevel = Level.FINE;
            LOGGER.log(propertyTableLevel, "Checking Logging configuration in case it neeeds to be reinitialized");
            for (String propName : properties.properties()) {
               
View Full Code Here

            List<Object> newValues = new ArrayList<Object>(properties.properties().size());
            List<Object> oldValues = new ArrayList<Object>(properties.properties().size());
           
            final Level propertyTableLevel = Level.FINE;
            LOGGER.log(propertyTableLevel, "Checking Logging configuration in case it neeeds to be reinitialized");
            for (String propName : properties.properties()) {
               
                // Don't care about the return type
                Method read = properties.getter(propName, null);
               
                Object newVal = read.invoke(realLogInfo);
View Full Code Here

        log("Creating property mappings for " + clazz.getName());

        final ClassProperties classProperties = new ClassProperties(clazz);

        List<String> properties = Lists.newArrayList(classProperties.properties());
        Collections.sort(properties);

        for (String propertyName : properties) {
            propertyName = fixCase(propertyName);
            Method getter = classProperties.getter(propertyName, null);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.