Tabnine Logo
Property
Code IndexAdd Tabnine to your IDE (free)

How to use
Property
in
org.uberfire.preferences.shared.annotations

Best Java code snippets using org.uberfire.preferences.shared.annotations.Property (Showing top 20 results out of 315)

origin: org.uberfire/uberfire-commons-editor-api

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)
origin: org.uberfire/uberfire-preferences-processors

public PropertyData(final Element element,
          final Property propertyAnnotation,
          final AnnotationMirror propertyAnnotationMirror,
          final Elements elementUtils) {
  fieldName = element.getSimpleName().toString();
  typeFullName = element.asType().toString();
  final char elementNameFirstLetter = fieldName.charAt(0);
  final char elementNameCapitalizedFirstLetter = Character.toUpperCase(elementNameFirstLetter);
  final String nameWithoutFirstLetter = fieldName.substring(1);
  capitalizedFieldName = elementNameCapitalizedFirstLetter + nameWithoutFirstLetter;
  shared = propertyAnnotation.shared();
  final TypeElement typeElement = elementUtils.getTypeElement(element.asType().toString());
  subPreference = typeElement != null && typeElement.getAnnotation(WorkbenchPreference.class) != null;
  formType = propertyAnnotation.formType();
  privateAccess = element.getModifiers().contains(Modifier.PRIVATE);
  typeKind = element.asType().getKind();
  setupValidators(propertyAnnotationMirror,
          elementUtils);
}
origin: kiegroup/appformer

if (propertyAnnotation != null) {
  String propertyBundleKey = "";
  if (!propertyAnnotation.bundleKey().isEmpty()) {
    propertyBundleKey = propertyAnnotation.bundleKey();
                                         propertyAnnotation.shared(),
                                         false,
                                         propertyBundleKey,
                       propertyAnnotation.helpBundleKey());
  hierarchyElement.addPropertyFormOptions(field.getName(),
                      propertyAnnotation.formOptions());
origin: kiegroup/appformer

private <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void save(final Class<U> clazz,
                                           final T portablePreference,
                                           final PreferenceScope scope) throws IllegalAccessException {
  for (Field field : portablePreference.getPojoClass().getDeclaredFields()) {
    Property propertyAnnotation = field.getAnnotation(Property.class);
    if (propertyAnnotation != null) {
      if (field.getType().isAnnotationPresent(WorkbenchPreference.class)) {
        boolean shared = propertyAnnotation.shared();
        field.setAccessible(true);
        if (shared) {
          saveSharedPreference(portablePreference,
                     field,
                     scope);
        } else {
          saveSubPreference(portablePreference,
                   field,
                   scope);
        }
      }
    }
  }
}
origin: kiegroup/appformer

private <U extends BasePreference<U>, T extends BasePreferencePortable<U>> T load(final Class<U> clazz,
                                         T portablePreference,
                                         final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo) throws IllegalAccessException {
  if (portablePreference == null) {
    portablePreference = lookupPortablePreference(clazz);
  }
  for (Field field : portablePreference.getPojoClass().getDeclaredFields()) {
    Property propertyAnnotation = field.getAnnotation(Property.class);
    if (propertyAnnotation != null) {
      if (field.getType().isAnnotationPresent(WorkbenchPreference.class)) {
        final Class<? extends BasePreference<?>> propertyType = (Class<? extends BasePreference<?>>) field.getType();
        boolean shared = propertyAnnotation.shared();
        field.setAccessible(true);
        if (shared) {
          BasePreferencePortable<?> loadedSharedProperty = loadSharedPreference(field,
                                             scopeResolutionStrategyInfo);
          field.set(portablePreference,
               loadedSharedProperty);
        } else {
          final BasePreferencePortable<?> subPreferenceValue = loadSubPreferenceValue(portablePreference,
                                                field,
                                                scopeResolutionStrategyInfo);
          field.set(portablePreference,
               subPreferenceValue);
        }
      }
    }
  }
  return portablePreference;
}
origin: org.uberfire/uberfire-preferences-api

/**
 * 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;
}

origin: kiegroup/appformer

public PropertyData(final Element element,
          final Property propertyAnnotation,
          final AnnotationMirror propertyAnnotationMirror,
          final Elements elementUtils) {
  fieldName = element.getSimpleName().toString();
  typeFullName = element.asType().toString();
  final char elementNameFirstLetter = fieldName.charAt(0);
  final char elementNameCapitalizedFirstLetter = Character.toUpperCase(elementNameFirstLetter);
  final String nameWithoutFirstLetter = fieldName.substring(1);
  capitalizedFieldName = elementNameCapitalizedFirstLetter + nameWithoutFirstLetter;
  shared = propertyAnnotation.shared();
  final TypeElement typeElement = elementUtils.getTypeElement(element.asType().toString());
  subPreference = typeElement != null && typeElement.getAnnotation(WorkbenchPreference.class) != null;
  formType = propertyAnnotation.formType();
  privateAccess = element.getModifiers().contains(Modifier.PRIVATE);
  typeKind = element.asType().getKind();
  setupValidators(propertyAnnotationMirror,
          elementUtils);
}
origin: kiegroup/appformer

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)
origin: kiegroup/appformer

/**
 * 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;
}

origin: kiegroup/appformer

@WorkbenchPreference(identifier = "WorkspaceManagerPreferences", bundleKey = "WorkspaceManagerPreferences.Label")
public class WorkspaceManagerPreferences implements BasePreference<WorkspaceManagerPreferences> {
  @Property(bundleKey = "WorkspaceManagerPreferences.CacheMaximumSize")
  private int cacheMaximumSize;
  @Property(bundleKey = "WorkspaceManagerPreferences.CacheExpirationTime")
  private int cacheExpirationTime;
  @Property(bundleKey = "WorkspaceManagerPreferences.CacheExpirationUnit")
  private String cacheExpirationUnit;
origin: org.guvnor/guvnor-m2repo-editor-api

@WorkbenchPreference(identifier = "ArtifactRepositoryPreference", bundleKey = "ArtifactRepositoryPreference.Label")
public class ArtifactRepositoryPreference implements BasePreference<ArtifactRepositoryPreference> {
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDir")
  private String globalM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean globalM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDir")
  private String workspaceM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean workspaceM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.DistributionManagementM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean distributionManagementM2RepoDirEnabled;
origin: org.uberfire/uberfire-m2repo-editor-api

@WorkbenchPreference(identifier = "ArtifactRepositoryPreference", bundleKey = "ArtifactRepositoryPreference.Label")
public class ArtifactRepositoryPreference implements BasePreference<ArtifactRepositoryPreference> {
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDir",
      validators = NotEmptyValidator.class)
  private String globalM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean globalM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDir",
      validators = NotEmptyValidator.class)
  private String workspaceM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean workspaceM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.DistributionManagementM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean distributionManagementM2RepoDirEnabled;
origin: kiegroup/appformer

@WorkbenchPreference(identifier = "ArtifactRepositoryPreference", bundleKey = "ArtifactRepositoryPreference.Label")
public class ArtifactRepositoryPreference implements BasePreference<ArtifactRepositoryPreference> {
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDir",
      validators = NotEmptyValidator.class)
  private String globalM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.GlobalM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean globalM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDir",
      validators = NotEmptyValidator.class)
  private String workspaceM2RepoDir;
  @Property(bundleKey = "ArtifactRepositoryPreference.WorkspaceM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean workspaceM2RepoDirEnabled;
  @Property(bundleKey = "ArtifactRepositoryPreference.DistributionManagementM2RepoDirEnabled", formType = PropertyFormType.BOOLEAN)
  private boolean distributionManagementM2RepoDirEnabled;
origin: org.uberfire/uberfire-project-api

static final String CHILD_GAV_EDIT_ENABLED = "org.guvnor.project.gav.child.edit.enabled";
@Property(bundleKey = "GAVPreferences.ConflictingGAVCheckDisabled.Label",
    helpBundleKey = "GAVPreferences.ConflictingGAVCheckDisabled.Help",
    formType = PropertyFormType.BOOLEAN)
private boolean conflictingGAVCheckDisabled;
@Property(bundleKey = "GAVPreferences.ChildGAVEditEnabled.Label",
    helpBundleKey = "GAVPreferences.ChildGAVEditEnabled.Help",
    formType = PropertyFormType.BOOLEAN)
origin: kiegroup/appformer

static final String CHILD_GAV_EDIT_ENABLED = "org.guvnor.project.gav.child.edit.enabled";
@Property(bundleKey = "GAVPreferences.ConflictingGAVCheckDisabled.Label",
    helpBundleKey = "GAVPreferences.ConflictingGAVCheckDisabled.Help",
    formType = PropertyFormType.BOOLEAN)
private boolean conflictingGAVCheckDisabled;
@Property(bundleKey = "GAVPreferences.ChildGAVEditEnabled.Label",
    helpBundleKey = "GAVPreferences.ChildGAVEditEnabled.Help",
    formType = PropertyFormType.BOOLEAN)
origin: org.jbpm/jbpm-wb-common-api

@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;
  }
}
origin: org.kie.workbench/kie-wb-common-ala-ui-api

/**
 * 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;
  }
}

origin: org.guvnor/guvnor-ala-ui-api

/**
 * 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;
  }
}

origin: kiegroup/jbpm-wb

@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;
  }
}
origin: org.uberfire/uberfire-preferences-backend

@WorkbenchPreference(identifier = "MySharedPreference",
    bundleKey = "MySharedPreference.Label")
public class MySharedPreference implements BasePreference<MySharedPreference> {

  @Property(bundleKey = "MySharedPreference.Text")
  String text;

  @Property(bundleKey = "MySharedPreference.MyInnerPreference2")
  MyInnerPreference2 myInnerPreference2;
}

org.uberfire.preferences.shared.annotationsProperty

Most used methods

  • <init>
  • shared
  • bundleKey
  • formOptions
  • formType
  • helpBundleKey

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now