| /* |
| * Copyright (c) 2010-2020 BSI Business Systems Integration AG. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * BSI Business Systems Integration AG - initial API and implementation |
| */ |
| package org.eclipse.scout.sdk.core.s.annotation; |
| |
| import org.eclipse.scout.sdk.core.model.api.AbstractManagedAnnotation; |
| import org.eclipse.scout.sdk.core.model.api.IType; |
| import org.eclipse.scout.sdk.core.s.IScoutRuntimeTypes; |
| |
| /** |
| * <h3>{@link FormDataAnnotation}</h3> Represents one single @FormData annotation occurrence |
| * |
| * @since 5.2.0 |
| */ |
| public class FormDataAnnotation extends AbstractManagedAnnotation { |
| |
| public static final String VALUE_ELEMENT_NAME = "value"; |
| public static final String INTERFACES_ELEMENT_NAME = "interfaces"; |
| public static final String GENERIC_ORDINAL_ELEMENT_NAME = "genericOrdinal"; |
| public static final String DEFAULT_SUBTYPE_SDK_COMMAND_ELEMENT_NAME = "defaultSubtypeSdkCommand"; |
| public static final String SDK_COMMAND_ELEMENT_NAME = "sdkCommand"; |
| |
| public static final String TYPE_NAME = IScoutRuntimeTypes.FormData; |
| |
| public IType value() { |
| return getValue(VALUE_ELEMENT_NAME, IType.class, null); |
| } |
| |
| public SdkCommand sdkCommand() { |
| return getValueAsEnum(SDK_COMMAND_ELEMENT_NAME, SdkCommand.class); |
| } |
| |
| public DefaultSubtypeSdkCommand defaultSubtypeSdkCommand() { |
| return getValueAsEnum(DEFAULT_SUBTYPE_SDK_COMMAND_ELEMENT_NAME, DefaultSubtypeSdkCommand.class); |
| } |
| |
| public int genericOrdinal() { |
| return getValue(GENERIC_ORDINAL_ELEMENT_NAME, int.class, null); |
| } |
| |
| public IType[] interfaces() { |
| return getValue(INTERFACES_ELEMENT_NAME, IType[].class, null); |
| } |
| |
| public boolean isValueDefault() { |
| return isDefault(VALUE_ELEMENT_NAME); |
| } |
| |
| public boolean isSdkCommandDefault() { |
| return isDefault(SDK_COMMAND_ELEMENT_NAME); |
| } |
| |
| public boolean isDefaultSubtypeSdkCommandDefault() { |
| return isDefault(DEFAULT_SUBTYPE_SDK_COMMAND_ELEMENT_NAME); |
| } |
| |
| public boolean isGenericOrdinalDefault() { |
| return isDefault(GENERIC_ORDINAL_ELEMENT_NAME); |
| } |
| |
| public boolean isInterfacesDefault() { |
| return isDefault(INTERFACES_ELEMENT_NAME); |
| } |
| |
| public enum SdkCommand { |
| CREATE, USE, IGNORE, DEFAULT |
| } |
| |
| public enum DefaultSubtypeSdkCommand { |
| CREATE, IGNORE, DEFAULT |
| } |
| } |