/** * Represents a tab in a tabbed layout. * @see TabbedLayoutDefinition */ @I18nable(keyGenerator = TabDefinitionKeyGenerator.class) public interface TabDefinition extends NamedDefinition { @I18nText String getLabel(); List<NamedFieldDefinition> getFields(); }
/** * Describes a sub app. * * @see SubApp */ @I18nable(keyGenerator = SubAppDescriptorKeyGenerator.class) public interface SubAppDescriptor { String getName(); @I18nText String getLabel(); boolean isClosable(); String getIcon(); Class<? extends SubApp> getSubAppClass(); Map<String, ActionDefinition> getActions(); }
/** * Defines the layout of apps in the app launcher. Apps are organized into groups. * * @see AppLauncherGroupDefinition * @see AppLauncherGroupEntryDefinition */ @I18nable public interface AppLauncherLayoutDefinition { List<AppLauncherGroupDefinition> getGroups(); default List<String> getHiddenApps() { return new ArrayList<>(); } default String getDefaultGroup() { return null; } }
/** * Defines a a group in the layout of apps in the app launcher. * * @see AppLauncherLayoutDefinition * @see AppLauncherGroupEntryDefinition */ @I18nable(keyGenerator = AppLauncherGroupDefinitionKeyGenerator.class) public interface AppLauncherGroupDefinition { String getName(); @I18nText String getLabel(); boolean isPermanent(); boolean isClientGroup(); String getColor(); List<AppLauncherGroupEntryDefinition> getApps(); AccessDefinition getPermissions(); }
/** * The definition for a section of the action bar, made of groups of actions. */ @I18nable(keyGenerator = ActionbarSectionDefinitionKeyGenerator.class) public interface ActionbarSectionDefinition { String getName(); @I18nText String getLabel(); String getI18nBasename(); /** * Gets the groups within this section. * * @return the list of groups */ List<ActionbarGroupDefinition> getGroups(); AvailabilityDefinition getAvailability(); }
/** * Configured definition of a dialog. */ @Data @I18nable(keyGenerator = DialogDefinitionKeyGenerator.class) public class ConfiguredDialogDefinition implements DialogDefinition { private String id; private String label; private Map<String, ActionDefinition> actions; }
/** * The definition for an action bar, made of sections and groups of actions. */ @I18nable public interface ActionbarDefinition { /** * Gets the name of the default action. * * @return the default action name */ String getDefaultAction(); /** * Gets the name of the default delete action. * * @return the default delete action name */ String getDeleteAction(); /** * Gets the sections within this action bar. * * @return the list of sections */ List<ActionbarSectionDefinition> getSections(); }
@I18nable(keyGenerator = AppDescriptorKeyGenerator.class) public interface AppDescriptor extends NamedDefinition, Serializable {
/** * TestI18nAbleRootObject. */ @I18nable(keyGenerator = TestI18nAbleRootObjectKeyGen.class) public class TestI18nAbleRootObject extends TestRootObject { @I18nText public String getFoo() { return "foo"; } }
/** * Fake ChooseDialogDefinition - cannot use the right one here, as it is defined in a dependent artifact. */ @I18nable public static class TestChooseDialogDefinition { private Map<String, ActionDefinition> actions = new HashMap<>(); public Map<String, ActionDefinition> getActions() { return this.actions; } }
@I18nable public static class WithMethodArgs { private String foo; public String getFoo(String s, int i) { return foo; } public void setFoo(String foo) { this.foo = foo; } }
/** * TestI18nAbleRootObjectWithoutKeyGenerator. */ @I18nable public class TestI18nAbleRootObjectWithoutKeyGenerator extends TestRootObject { }
/** * TestI18nAbleActionDefinition. */ @I18nable(keyGenerator = ActionDefinitionKeyGenerator.class) public class TestI18nAbleActionDefinition extends ConfiguredActionDefinition { @Override @I18nText public String getLabel() { return super.getLabel(); } }
/** * Fake ChooseDialogDefinition - cannot use the right one here, as it is defined in a dependent artifact. */ @I18nable public static class TestChooseDialogDefinition { private FieldDefinition field; public FieldDefinition getField() { return field; } public void setField(FieldDefinition field) { this.field = field; } } }
/** * TestI18nAbleRootObjectWithGetNameMethod. */ @I18nable public class TestI18nAbleRootObjectWithGetNameMethod extends TestRootObject { private String name; public void setName(String name) { this.name = name; } public String getName() { return name; } }
/** * TestI18nAbleRootObjectWithGetIdMethod. */ @I18nable public class TestI18nAbleRootObjectWithGetIdMethod extends TestRootObject { private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } }
@I18nable public static class WithNonStringText { private DateFormat dateFormat; private Float f_loat; public WithNonStringText(DateFormat dateFormat, Float f_loat) { this.dateFormat = dateFormat; this.f_loat = f_loat; } @I18nText public DateFormat getDateFormat() { return dateFormat; } @I18nText public Float getFloat() { return f_loat; } }
@I18nable public class TestDialogDef { private String id; private FormDefinition form; public String getId() { return id; } public void setId(String id) { this.id = id; } public FormDefinition getForm() { return form; } public void setForm(FormDefinition form) { this.form = form; } }
/** * Dummy definition for testing key generation field definitions outside of form context. */ @I18nable public static class DummyDefinition { private FieldDefinition dummyField; public String getName() { return "dummy"; } public FieldDefinition getDummyField() { return dummyField; } public void setDummyField(final FieldDefinition dummyField) { this.dummyField = dummyField; } }
@I18nable public static class WithStuffInConstructor { private String foo; private String bar; public WithStuffInConstructor() { setFoo("default"); setBar("default"); } @I18nText public String getFoo() { return foo; } public void setFoo(String foo) { this.foo = foo; } public String getBar() { return bar; } public void setBar(String bar) { this.bar = bar; } }