private boolean matches(CompiledObjectCollectionView view) throws ObjectNotFoundException, SchemaException { if (identifier != null) { if (!identifier.equals(view.getViewIdentifier())) { return false; } } // TODO: more criteria return true; }
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; }
public ObjectCollectionViewAsserter<RA> assertName(String expected) { assertEquals("Wrong view name in "+desc(), expected, view.getViewIdentifier()); return this; }
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); }
LOGGER.warn("Archetype {} referenced from view {} was not found", collectionRef.getOid(), existingView.getViewIdentifier()); try { objectCollectionType = objectResolver.resolve(collectionRef, ObjectCollectionType.class, null, "view "+existingView.getViewIdentifier(), task, result); } catch (ObjectNotFoundException e) { throw new ConfigurationException(e.getMessage(), e);