Codota Logo
PropertyType.getSupportedEntityTypes
Code IndexAdd Codota to your IDE (free)

How to use
getSupportedEntityTypes
method
in
net.nemerosa.ontrack.model.structure.PropertyType

Best Java code snippets using net.nemerosa.ontrack.model.structure.PropertyType.getSupportedEntityTypes (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: net.nemerosa.ontrack/ontrack-service

@Override
public List<Property<?>> getProperties(ProjectEntity entity) {
  // With all the existing properties...
  return getPropertyTypes().stream()
      // ... filters them by entity
      .filter(type -> type.getSupportedEntityTypes().contains(entity.getProjectEntityType()))
      // ... filters them by access right
      .filter(type -> type.canView(entity, securityService))
      // ... loads them from the store
      .map(type -> getProperty(type, entity))
      // .. flags with editionrights
      .map(prop -> prop.editable(prop.getType().canEdit(entity, securityService)))
      // ... and returns them
      .collect(Collectors.toList());
}
origin: net.nemerosa.ontrack/ontrack-ui-graphql

@Override
public List<GraphQLFieldDefinition> getFields(Class<? extends ProjectEntity> projectEntityClass, ProjectEntityType projectEntityType) {
  return propertyService.getPropertyTypes().stream()
      // Gets properties which supports this type of entity
      .filter(propertyType -> propertyType.getSupportedEntityTypes().contains(projectEntityType))
      // Gets as a field definition
      .map(propertyType -> newFieldDefinition()
          .name(propertyFieldName(propertyType))
          .description(propertyType.getDescription())
          .type(property.getTypeRef())
          .dataFetcher(projectEntityPropertyDataFetcher(propertyType, projectEntityClass))
          .build())
      // OK
      .collect(Collectors.toList());
}
origin: net.nemerosa.ontrack/ontrack-service

protected <T> T getPropertyValue(PropertyType<T> type, ProjectEntity entity) {
  // Supported entity?
  if (!type.getSupportedEntityTypes().contains(entity.getProjectEntityType())) {
    throw new PropertyUnsupportedEntityTypeException(type.getClass().getName(), entity.getProjectEntityType());
  }
  // Checks for viewing
  if (!type.canView(entity, securityService)) {
    throw new AccessDeniedException("Property is not opened for viewing.");
  }
  // Gets the raw information from the repository
  TProperty t = propertyRepository.loadProperty(
      type.getClass().getName(),
      entity.getProjectEntityType(),
      entity.getId());
  // If null, returns null
  if (t == null) {
    return null;
  }
  // Converts the stored value into an actual value
  return type.fromStorage(t.getJson());
}
net.nemerosa.ontrack.model.structurePropertyTypegetSupportedEntityTypes

Javadoc

List of entity types this property applies to.

Popular methods of PropertyType

  • containsValue
    Checks if the property value contains the given search token. By default, this method uses the #getS
  • fromStorage
    Parses the storage JSON representation for a property value.
  • getDescription
    Description for this property
  • getName
    Display name for this property
  • getSearchArguments
    Gets the additional SQL criteria to add to a search.
  • canEdit
    Edition policy. Can this property be directly edited by a used on the given associated entity.
  • canView
    Defines the authorization policy for viewing this property.
  • copy
    Copy/clones the value defined for the sourceEntity for being suitable in the targetEntity after appl
  • forStorage
    Gets the JSON representation of a property value
  • fromClient
    Parses the client JSON representation for a property value. This methodMUST perform validation befo
  • getEditionForm
    Form to create/update this property.
  • getFeature
  • getEditionForm,
  • getFeature,
  • getTypeName,
  • of,
  • onPropertyChanged,
  • onPropertyDeleted,
  • replaceValue

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now