public class FileExportsPreferences implements BasePreference<FileExportsPreferences> { @Property(bundleKey = "FileExport.PdfOrientation.Text", helpBundleKey = "FileExport.PdfOrientation.Help", validators = PdfOrientationValidator.class) String pdfOrientation; @Property(bundleKey = "FileExport.PdfUnit.Text", helpBundleKey = "FileExport.PdfUnit.Help", validators = PdfUnitValidator.class) String pdfUnit; @Property(bundleKey = "FileExport.PdfFormat.Text", helpBundleKey = "FileExport.PdfFormat.Help", validators = PdfFormatValidator.class)
/** * Created to be used in tests, and to avoid Errai errors due to unimplemented * interfaces used in portable classes. */ @Vetoed public class PortablePreferenceMock implements BasePreference<PortablePreferenceMock> { @Property(validators = NotEmptyValidator.class) String property; }
/** * Created to be used in tests, and to avoid Errai errors due to unimplemented * interfaces used in portable classes. */ @Vetoed public class PortablePreferenceMock implements BasePreference<PortablePreferenceMock> { @Property(validators = NotEmptyValidator.class) String property; }
public class FileExportsPreferences implements BasePreference<FileExportsPreferences> { @Property(bundleKey = "FileExport.PdfOrientation.Text", helpBundleKey = "FileExport.PdfOrientation.Help", validators = PdfOrientationValidator.class) String pdfOrientation; @Property(bundleKey = "FileExport.PdfUnit.Text", helpBundleKey = "FileExport.PdfUnit.Help", validators = PdfUnitValidator.class) String pdfUnit; @Property(bundleKey = "FileExport.PdfFormat.Text", helpBundleKey = "FileExport.PdfFormat.Help", validators = PdfFormatValidator.class)
@WorkbenchPreference(identifier = "ManagePreferences", bundleKey = "ManagePreferences.Label") public class ManagePreferences implements BasePreference<ManagePreferences> { public static List<Integer> PAGINATION_OPTIONS = Arrays.asList(10, 20, 50, 100); public static Integer DEFAULT_PAGINATION_OPTION = 10; @Property(bundleKey = "ManagePreferences.ItemsPerPage", helpBundleKey = "ManagePreferences.ItemsPerPage.Help", formType = PropertyFormType.NATURAL_NUMBER, validators = ItemPerPageValidator.class) private Integer itemsPerPage; @Override public ManagePreferences defaultValue(final ManagePreferences defaultValue) { defaultValue.itemsPerPage = DEFAULT_PAGINATION_OPTION; return defaultValue; } public Integer getItemsPerPage() { return itemsPerPage; } public void setItemsPerPage(Integer itemsPerPage) { this.itemsPerPage = itemsPerPage; } }
@WorkbenchPreference(identifier = "ManagePreferences", bundleKey = "ManagePreferences.Label") public class ManagePreferences implements BasePreference<ManagePreferences> { public static List<Integer> PAGINATION_OPTIONS = Arrays.asList(10, 20, 50, 100); public static Integer DEFAULT_PAGINATION_OPTION = 10; @Property(bundleKey = "ManagePreferences.ItemsPerPage", helpBundleKey = "ManagePreferences.ItemsPerPage.Help", formType = PropertyFormType.NATURAL_NUMBER, validators = ItemPerPageValidator.class) private Integer itemsPerPage; @Override public ManagePreferences defaultValue(final ManagePreferences defaultValue) { defaultValue.itemsPerPage = DEFAULT_PAGINATION_OPTION; return defaultValue; } public Integer getItemsPerPage() { return itemsPerPage; } public void setItemsPerPage(Integer itemsPerPage) { this.itemsPerPage = itemsPerPage; } }
/** * Provisioning management related preferences. */ @WorkbenchPreference(identifier = "ProvisioningPreferences") public class ProvisioningPreferences implements BasePreference<ProvisioningPreferences> { @Property private Map<ProviderType, Boolean> providerTypeEnablements; public Map<ProviderType, Boolean> getProviderTypeEnablements() { return providerTypeEnablements; } public void setProviderTypeEnablements(final Map<ProviderType, Boolean> providerTypeEnablements) { this.providerTypeEnablements = providerTypeEnablements; } @Override public ProvisioningPreferences defaultValue(final ProvisioningPreferences defaultValue) { defaultValue.setProviderTypeEnablements(new HashMap<>()); return defaultValue; } }
/** * Provisioning management related preferences. */ @WorkbenchPreference(identifier = "ProvisioningPreferences") public class ProvisioningPreferences implements BasePreference<ProvisioningPreferences> { @Property private Map<ProviderType, Boolean> providerTypeEnablements; public Map<ProviderType, Boolean> getProviderTypeEnablements() { return providerTypeEnablements; } public void setProviderTypeEnablements(final Map<ProviderType, Boolean> providerTypeEnablements) { this.providerTypeEnablements = providerTypeEnablements; } @Override public ProvisioningPreferences defaultValue(final ProvisioningPreferences defaultValue) { defaultValue.setProviderTypeEnablements(new HashMap<>()); return defaultValue; } }
@WorkbenchPreference(identifier = "MySharedPreference", bundleKey = "MySharedPreference.Label") public class MySharedPreference implements BasePreference<MySharedPreference> { @Property(bundleKey = "MySharedPreference.Text") String text; @Property(bundleKey = "MySharedPreference.MyInnerPreference2") MyInnerPreference2 myInnerPreference2; }
@WorkbenchPreference(identifier = "MySharedPreference", bundleKey = "MySharedPreference.Label") public class MySharedPreference implements BasePreference<MySharedPreference> { @Property(bundleKey = "MySharedPreference.Text") String text; @Property(bundleKey = "MySharedPreference.MyInnerPreference2") MyInnerPreference2 myInnerPreference2; }
@WorkbenchPreference(identifier = "MySharedPreference", bundleKey = "MySharedPreference.Label") public class MySharedPreference implements BasePreference<MySharedPreference> { @Property(bundleKey = "MySharedPreference.Text") String text; @Property(bundleKey = "MySharedPreference.MyInnerPreference2") MyInnerPreference2 myInnerPreference2; }
@WorkbenchPreference(identifier = "MySharedPreference", bundleKey = "MySharedPreference.Label") public class MySharedPreference implements BasePreference<MySharedPreference> { @Property(bundleKey = "MySharedPreference.Text") String text; @Property(bundleKey = "MySharedPreference.MyInnerPreference2") MyInnerPreference2 myInnerPreference2; }
public class MyPreference implements BasePreference<MyPreference> { @Property(bundleKey = "MyPreference.Text", helpBundleKey = "MyPreference.Text.Help", validators = NotEmptyValidator.class, String text; @Property(formType = PropertyFormType.BOOLEAN, bundleKey = "MyPreference.SendReports") boolean sendReports; @Property(formType = PropertyFormType.COLOR, bundleKey = "MyPreference.BackgroundColor") String backgroundColor; @Property(formType = PropertyFormType.NATURAL_NUMBER, bundleKey = "MyPreference.Age") int age; @Property(formType = PropertyFormType.SECRET_TEXT, bundleKey = "MyPreference.Password") String password; @Property(bundleKey = "MyPreference.MyInnerPreference") MyInnerPreference myInnerPreference; @Property(shared = true, bundleKey = "MyPreference.MySharedPreference") MySharedPreference mySharedPreference;
public class MyPreference implements BasePreference<MyPreference> { @Property(bundleKey = "MyPreference.Text", helpBundleKey = "MyPreference.Text.Help", validators = NotEmptyValidator.class, String text; @Property(formType = PropertyFormType.BOOLEAN, bundleKey = "MyPreference.SendReports") boolean sendReports; @Property(formType = PropertyFormType.COLOR, bundleKey = "MyPreference.BackgroundColor") String backgroundColor; @Property(formType = PropertyFormType.NATURAL_NUMBER, bundleKey = "MyPreference.Age") int age; @Property(formType = PropertyFormType.SECRET_TEXT, bundleKey = "MyPreference.Password") String password; @Property(bundleKey = "MyPreference.MyInnerPreference") MyInnerPreference myInnerPreference; @Property(shared = true, bundleKey = "MyPreference.MySharedPreference") MySharedPreference mySharedPreference;
@WorkbenchPreference(identifier = "MyInnerPreference", bundleKey = "MyInnerPreference.Label") public class MyInnerPreference implements BasePreference<MyInnerPreference> { @Property(bundleKey = "MyInnerPreference.Text") String text; public String getText() { return text; } public void setText(final String text) { this.text = text; } }
@WorkbenchPreference(identifier = "MyInnerPreference", bundleKey = "MyInnerPreference.Label") public class MyInnerPreference implements BasePreference<MyInnerPreference> { @Property(bundleKey = "MyInnerPreference.Text") String text; public String getText() { return text; } public void setText(final String text) { this.text = text; } }
@WorkbenchPreference(identifier = "InvalidDefaultPreference") public class InvalidDefaultPreference implements BasePreference<InvalidDefaultPreference> { @Property String text; @Override public InvalidDefaultPreference defaultValue(final InvalidDefaultPreference defaultValue) { return new InvalidDefaultPreference(); } }
@WorkbenchPreference(identifier = "MyInnerPreference", bundleKey = "MyInnerPreference.Label") public class MyInnerPreference implements BasePreference<MyInnerPreference> { @Property(bundleKey = "MyInnerPreference.Text") String text; public String getText() { return text; } public void setText(final String text) { this.text = text; } }
@WorkbenchPreference(identifier = "InvalidDefaultPreference") public class InvalidDefaultPreference implements BasePreference<InvalidDefaultPreference> { @Property String text; @Override public InvalidDefaultPreference defaultValue(final InvalidDefaultPreference defaultValue) { return new InvalidDefaultPreference(); } }
@WorkbenchPreference(identifier = "MyInnerPreference", bundleKey = "MyInnerPreference.Label") public class MyInnerPreference implements BasePreference<MyInnerPreference> { @Property(bundleKey = "MyInnerPreference.Text") String text; public String getText() { return text; } public void setText(final String text) { this.text = text; } }