Java Code Examples for com.google.web.bindery.autobean.shared.AutoBean#setTag()

The following examples show how to use com.google.web.bindery.autobean.shared.AutoBean#setTag() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExpressionAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Map<String,String> getExpressions(Object bean)
{
    final AutoBean autoBean = asAutoBean(bean);

    Map<String, String> exprMap = (Map<String,String>)autoBean.getTag(EXPR_TAG);
    if(null==exprMap)
    {
        exprMap = new HashMap<String,String>();
        autoBean.setTag(EXPR_TAG, exprMap);
    }

    return exprMap;
}
 
Example 2
Source File: RBACAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Set<String> getFilteredAttributes(Object bean)
{
    final AutoBean autoBean = asAutoBean(bean);

    Set<String> atts = (Set<String>)autoBean.getTag(FILTERED_TAG);
    if(null==atts)
    {
        atts = new HashSet<String>();
        autoBean.setTag(FILTERED_TAG, atts);
    }

    return atts;
}
 
Example 3
Source File: RBACAdapter.java    From core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static Set<String> getReadonlyAttributes(Object bean)
{
    final AutoBean autoBean = asAutoBean(bean);

    Set<String> atts = (Set<String>)autoBean.getTag(READ_ONLY_TAG);
    if(null==atts)
    {
        atts = new HashSet<String>();
        autoBean.setTag(READ_ONLY_TAG, atts);
    }

    return atts;
}
 
Example 4
Source File: RBACAdapter.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static void setFilteredAttributes(Object bean, Set<String> atts)
{
    final AutoBean autoBean = asAutoBean(bean);
    autoBean.setTag(FILTERED_TAG, atts);
}
 
Example 5
Source File: RBACAdapter.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
public static <T> void setReadOnlyAttributes(T entity, Set<String> readonlyJavaNames) {
    final AutoBean autoBean = asAutoBean(entity);
    autoBean.setTag(READ_ONLY_TAG, readonlyJavaNames);
}