CompiledObjectCollectionView
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using com.evolveum.midpoint.model.api.authentication.CompiledObjectCollectionView (Showing top 14 results out of 315)

origin: Evolveum/midpoint

private boolean matches(CompiledObjectCollectionView view) throws ObjectNotFoundException, SchemaException {
  
  if (identifier != null) {
    if (!identifier.equals(view.getViewIdentifier())) {
      return false;
    }
  }
  
  // TODO: more criteria
  return true;
}

origin: Evolveum/midpoint

private void compileDisplay(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) {
  DisplayType newDisplay = objectListViewType.getDisplay();
  if (newDisplay == null) {
    return;
  }
  if (existingView.getDisplay() == null) {
    existingView.setDisplay(newDisplay);
  }
  mergeDisplay(existingView.getDisplay(), newDisplay);
}
origin: Evolveum/midpoint

public ObjectFilter getFilter() {
  return view.getFilter();
}
origin: Evolveum/midpoint

QName targetObjectType = existingView.getObjectType();
Class<? extends ObjectType> targetTypeClass = ObjectType.class;
if (targetObjectType != null) {
  filter.setTargetTypeNullAsAny(true);
  filter.setRelationNullAsAny(true);
  existingView.setFilter(filter);
      DisplayType archetypeDisplay = archetypePolicy.getDisplay();
      if (archetypeDisplay != null) {
        DisplayType viewDisplay = existingView.getDisplay();
        if (viewDisplay == null) {
          viewDisplay = new DisplayType();
          existingView.setDisplay(viewDisplay);
    LOGGER.warn("Archetype {} referenced from view {} was not found", collectionRef.getOid(), existingView.getViewIdentifier());
    objectCollectionType = objectResolver.resolve(collectionRef, ObjectCollectionType.class, null, "view "+existingView.getViewIdentifier(), task, result);
  } catch (ObjectNotFoundException e) {
    throw new ConfigurationException(e.getMessage(), e);
    existingView.setFilter(collectionFilter);
  } else {
    compileCollection(existingView, baseCollectionSpec, task, result);
    ObjectFilter baseFilter = existingView.getFilter();
    ObjectFilter combinedFilter = ObjectQueryUtil.filterAnd(baseFilter, collectionFilter, prismContext);
    existingView.setFilter(combinedFilter);
origin: Evolveum/midpoint

private void compileCollection(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException {
  CollectionRefSpecificationType collectionSpec = objectListViewType.getCollection();
  if (collectionSpec == null) {
    ObjectReferenceType collectionRef = objectListViewType.getCollectionRef();
    if (collectionRef == null) {
      return;
    }
    // Legacy, deprecated
    collectionSpec = new CollectionRefSpecificationType();
    collectionSpec.setCollectionRef(collectionRef.clone());
  }
  if (existingView.getCollection() != null) {
    LOGGER.debug("Redefining collection in view {}", existingView.getViewIdentifier());
  }
  existingView.setCollection(collectionSpec);
  
  compileCollection(existingView, collectionSpec, task, result);
}
  
origin: Evolveum/midpoint

public DisplayTypeAsserter<ObjectCollectionViewAsserter<RA>> displayType() {
  DisplayTypeAsserter<ObjectCollectionViewAsserter<RA>> displayAsserter = new DisplayTypeAsserter<>(view.getDisplay(), this, "in " + desc());
  copySetupTo(displayAsserter);
  return displayAsserter;
}

origin: Evolveum/midpoint

private CompiledObjectCollectionView findOrCreateMatchingView(CompiledUserProfile composite, GuiObjectListViewType objectListViewType) {
  QName objectType = objectListViewType.getType();
  String viewIdentifier = determineViewIdentifier(objectListViewType);
  CompiledObjectCollectionView existingView = composite.findObjectCollectionView(objectType, viewIdentifier);
  if (existingView == null) {
    existingView = new CompiledObjectCollectionView(objectType, viewIdentifier);
    composite.getObjectCollectionViews().add(existingView);
  }
  return existingView;
}
origin: Evolveum/midpoint

private void compileActions(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) {
  List<GuiActionType> newActions = objectListViewType.getAction();
  for (GuiActionType newAction: newActions) {
    // TODO: check for action duplication/override
    existingView.getActions().add(newAction); // No need to clone, CompiledObjectCollectionView is not prism
  }
  
}

origin: Evolveum/midpoint

public boolean match(QName expectedObjectType, String expectedViewIdentifier) {
  if (!QNameUtil.match(objectType, expectedObjectType)) {
    return false;
  }
  if (expectedViewIdentifier == null) {
    if (isAllObjectsView()) {
      return true;
    } else {
      return false;
    }
  }
  return expectedViewIdentifier.equals(viewIdentifier);
}

origin: Evolveum/midpoint

private void compileColumns(CompiledObjectCollectionView existingView, GuiObjectListViewType objectListViewType) {
  List<GuiObjectColumnType> newColumns = objectListViewType.getColumn();
  if (newColumns == null || newColumns.isEmpty()) {
    return;
  }
  // Not very efficient algorithm. But must do for now.
  List<GuiObjectColumnType> existingColumns = existingView.getColumns();
  existingColumns.addAll(newColumns);
  List<GuiObjectColumnType> orderedList = orderCustomColumns(existingColumns);
  existingColumns.clear();
  existingColumns.addAll(orderedList);
}
origin: Evolveum/midpoint

private void applyViews(CompiledUserProfile composite, GuiObjectListViewsType viewsType, Task task, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException {
  if (viewsType == null) {
    return;
  }
  
  if (viewsType.getDefault() != null) {
    if (composite.getDefaultObjectCollectionView() == null) {
      composite.setDefaultObjectCollectionView(new CompiledObjectCollectionView());
    }
    compileView(composite.getDefaultObjectCollectionView(), viewsType.getDefault(), task, result);
  }
  
  for (GuiObjectListViewType objectCollectionView : viewsType.getObjectList()) { // Compatibility, legacy
    applyView(composite, objectCollectionView, task, result);
  }
  
  for (GuiObjectListViewType objectCollectionView : viewsType.getObjectCollectionView()) {
    applyView(composite, objectCollectionView, task, result);
  }
}

origin: Evolveum/midpoint

public <O extends ObjectType> CompiledObjectCollectionView findObjectViewByViewName(Class<O> compileTimeClass, String viewName){
  if (compileTimeClass == null || StringUtils.isEmpty(viewName)){
    return null;
  }
  List<CompiledObjectCollectionView> objectViews = findAllApplicableObjectCollectionViews(compileTimeClass);
  if (objectViews == null) {
    return null;
  }
  for (CompiledObjectCollectionView view : objectViews){
    if (viewName.equals(view.getViewIdentifier())){
      return view;
    }
  }
  return null;
}
origin: Evolveum/midpoint

public ObjectCollectionViewAsserter<RA> assertFilter() {
  assertNotNull("Null filter in "+desc(), view.getFilter());
  return this;
}

origin: Evolveum/midpoint

public ObjectCollectionViewAsserter<RA> assertName(String expected) {
  assertEquals("Wrong view name in "+desc(), expected, view.getViewIdentifier());
  return this;
}

com.evolveum.midpoint.model.api.authenticationCompiledObjectCollectionView

Most used methods

  • getViewIdentifier
  • getDisplay
  • getFilter
  • <init>
  • getActions
  • getCollection
  • getColumns
    Returns column definition list (already ordered). May return empty list if there is no definition. W
  • getObjectType
  • isAllObjectsView
  • match
  • setAdditionalPanels
  • setCollection
  • setAdditionalPanels,
  • setCollection,
  • setDisableSorting,
  • setDisplay,
  • setDistinct,
  • setFilter,
  • setSearchBoxConfiguration

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • IsNull (org.hamcrest.core)
    Is the value null?

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)