grails.databinding.DataBinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grace-databinding Show documentation
Show all versions of grace-databinding Show documentation
Grace Framework : Grace Databinding
The newest version!
/*
* Copyright 2014-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package grails.databinding;
import java.util.List;
import groovy.xml.slurpersupport.GPathResult;
import grails.databinding.events.DataBindingListener;
/**
* @author Jeff Brown
* @since 3.0
*/
public interface DataBinder {
String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.S";
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @param filter Only properties beginning with filter will be included in the
* data binding. For example, if filter is "person" and the binding
* source contains data for properties "person.name" and "author.name"
* the value of "person.name" will be bound to obj.name. The value of
* "author.name" will be ignored.
* @param whiteList A list of property names to be included during this data binding.
* All other properties represented in the binding source will be ignored
* @param blackList A list of properties names to be excluded during this data binding.
* @param listener A listener which will be notified of data binding events triggered
* by this binding
* @see DataBindingSource
* @see DataBindingListener
*/
void bind(Object obj, DataBindingSource source, String filter, List whiteList,
List blackList, DataBindingListener listener);
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @param filter Only properties beginning with filter will be included in the
* data binding. For example, if filter is "person" and the binding
* source contains data for properties "person.name" and "author.name"
* the value of "person.name" will be bound to obj.name. The value of
* "author.name" will be ignored.
* @param whiteList A list of property names to be included during this data binding.
* All other properties represented in the binding source will be ignored
* @param blackList A list of properties names to be excluded during this data binding.
* @see DataBindingSource
*/
void bind(Object obj, DataBindingSource source, String filter, List whiteList,
List blackList);
/**
*
* @param obj The object being bound to
* @param gpath A GPathResult which represents the data being bound.
* @see DataBindingSource
*/
void bind(Object obj, GPathResult gpath);
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @param whiteList A list of property names to be included during this data binding.
* All other properties represented in the binding source will be ignored
* @param blackList A list of properties names to be excluded during this data binding.
* @see DataBindingSource
*/
void bind(Object obj, DataBindingSource source, List whiteList,
List blackList);
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @param whiteList A list of property names to be included during this data binding.
* All other properties represented in the binding source
* will be ignored
* @see DataBindingSource
*/
void bind(Object obj, DataBindingSource source, List whiteList);
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @param listener A listener which will be notified of data binding events triggered
* by this binding
* @see DataBindingSource
* @see DataBindingListener
*/
void bind(Object obj, DataBindingSource source, DataBindingListener listener);
/**
*
* @param obj The object being bound to
* @param source The data binding source
* @see DataBindingSource
*/
void bind(Object obj, DataBindingSource source);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy