001/** 002 * Copyright 2005-2018 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.datadictionary.parse; 017 018import java.lang.annotation.Retention; 019import java.lang.annotation.RetentionPolicy; 020 021/** 022 * Annotation flag that the connected method is represented by the declared name in Spring Beans created using the 023 * custom schema. 024 * 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027@Retention(RetentionPolicy.RUNTIME) 028public @interface BeanTagAttribute { 029 030 /* 031 * Represents the type of an attribute within the schema (determines how it will be parsed). 032 * 033 * <ul> 034 * <li>Any - Property holds HTML content (any tags can be nested and populated as a string)</li> 035 * <li>ByType - The property tag itself can be missing, and any beans that match the type of the property 036 * will be used to populate its value. Note, only one attribute per class (and its supers) can have 037 * this setting</li> 038 * <li>Direct - The bean can be populated directly on the property tag. This means there is a bean 039 * with the same tag name as the property (prevent nested tags with the same name).</li> 040 * <li>DirectOrByType - Property can be configured by type or direct</li> 041 * <li>SingleValue - Property is a single standard value (attribute). (DEFAULT)</li> 042 * <li>SingleBean - Property is a single bean object</li> 043 * <li>ListBean - Property is a list consisting of beans</li> 044 * <li>ListValue - Property is a list consisting of standard values (string, int, char, etc)</li> 045 * <li>MapValue - The property is a map that consists of String keys and String values</li> 046 * <li>MapBean - The property is a map that consists of either String or bean keys and bean values</li> 047 * <li>SetValue - The property is a set consisting of standard values</li> 048 * <li>SetBean - The property is a set consisting of beans</li> 049 * </ul> 050 */ 051 public enum AttributeType { 052 ANY, BYTYPE, DIRECT, DIRECTORBYTYPE, SINGLEVALUE, SINGLEBEAN, LISTBEAN, LISTVALUE, MAPVALUE, MAPBEAN, 053 SETVALUE, SETBEAN, NOTSET 054 } 055 056 // name to use for the attribute in the custom schema, this will default to the name of the property if not set 057 String name() default ""; 058 059 // the type of the property defining how it should be parsed, generally this can be derived from the type 060 // and does not need to be set. Only in cases where the attribute needs to be set by type, direct, or any 061 AttributeType type() default AttributeType.NOTSET; 062}