/** * Create an instance of {@link ExtensionType } * */ public ExtensionType createExtensionType() { return new ExtensionType(); }
@Override public boolean equals(Object object) { if (!(object instanceof ExtensionType)) { return false; } ExtensionType other = ((ExtensionType) object); return asPrismContainerValue().equivalent(other.asPrismContainerValue()); }
public ExtensionType id(Long value) { setId(value); return this; }
public ExtensionType clone() { ExtensionType object = new ExtensionType(); PrismContainerValue value = asPrismContainerValue().clone(); object.setupContainerValue(value); return object; }
public static ExtensionType collectExtensions(AssignmentPath path, int startAt, PrismContext prismContext) throws SchemaException { ExtensionType rv = new ExtensionType(prismContext); PrismContainerValue<?> pcv = rv.asPrismContainerValue(); for (int i = startAt; i < path.getSegments().size(); i++) { AssignmentPathSegment segment = path.getSegments().get(i); AssignmentType assignment = segment.getAssignmentAny(); if (assignment != null && assignment.getExtension() != null) { ObjectTypeUtil.mergeExtension(pcv, assignment.getExtension().asPrismContainerValue()); } if (segment.getTarget() != null && segment.getTarget().getExtension() != null) { ObjectTypeUtil.mergeExtension(pcv, segment.getTarget().getExtension().asPrismContainerValue()); } } return rv; }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public OperationBusinessContextType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final OperationBusinessContextType clone = ((OperationBusinessContextType) super.clone()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ExtensionType clone.extension = ((this.extension == null)?null:((this.getExtension() == null)?null:this.getExtension().clone())); // CBuiltinLeafInfo: java.lang.String clone.comment = ((this.comment == null)?null:this.getComment()); return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
public ExtensionType(PrismContext prismContext) { setupContainerValue(new PrismContainerValueImpl<>(this, prismContext)); }
public static ExtensionType collectExtensions(AssignmentPathType path, int startAt, ModelService modelService, Task task, OperationResult result) throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, SecurityViolationException, ExpressionEvaluationException { ExtensionType rv = new ExtensionType(modelService.getPrismContext()); PrismContainerValue<?> pcv = rv.asPrismContainerValue(); PrismObject<? extends ObjectType> lastTarget = null; // used for caching for (int i = startAt; i < path.getSegment().size(); i++) { AssignmentPathSegmentType segment = path.getSegment().get(i); AssignmentType assignment = getAssignment(segment, lastTarget, modelService, task, result); if (assignment != null && assignment.getExtension() != null) { ObjectTypeUtil.mergeExtension(pcv, assignment.getExtension().asPrismContainerValue()); } PrismObject<? extends ObjectType> target = getAssignmentTarget(segment, modelService, task, result); if (target != null && target.getExtension() != null) { ObjectTypeUtil.mergeExtension(pcv, target.getExtensionContainerValue()); } lastTarget = target; } return rv; }
/** * Creates a new {@code OperationBusinessContextType} instance by deeply copying a given {@code OperationBusinessContextType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public OperationBusinessContextType(final OperationBusinessContextType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(); if (o == null) { throw new NullPointerException("Cannot create a copy of 'OperationBusinessContextType' from 'null'."); } // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ExtensionType this.extension = ((o.extension == null)?null:((o.getExtension() == null)?null:o.getExtension().clone())); // CBuiltinLeafInfo: java.lang.String this.comment = ((o.comment == null)?null:o.getComment()); }
/** * Create an instance of {@link ExtensionType } * */ public ExtensionType createExtensionType() { return new ExtensionType(); }
trigger.setTimestamp(triggerTime); trigger.setHandlerUri(handlerUri); ExtensionType extension = new ExtensionType(prismContext); trigger.setExtension(extension); PrismProperty<String> workItemIdProp = workItemIdDef.instantiate(); workItemIdProp.addRealValue(workItemId); trigger.getExtension().asPrismContainerValue().add(workItemIdProp); PrismContainer<WorkItemActionsType> workItemActionsCont = workItemActionsDef.instantiate(); workItemActionsCont.add(actions.asPrismContainerValue().clone()); extension.asPrismContainerValue().add(workItemActionsCont); PrismContainer<AbstractWorkItemActionType> workItemActionCont = workItemActionDef.instantiate(); workItemActionCont.add(notifyInfo.getValue().asPrismContainerValue().clone()); extension.asPrismContainerValue().add(workItemActionCont); @SuppressWarnings("unchecked") @NotNull PrismPropertyDefinition<Duration> timeBeforeActionDef = PrismProperty<Duration> timeBeforeActionProp = timeBeforeActionDef.instantiate(); timeBeforeActionProp.addRealValue(notifyInfo.getKey()); extension.asPrismContainerValue().add(timeBeforeActionProp);
public static void fromJaxb(ExtensionType jaxb, RAssignmentExtension repo, RAssignmentExtensionType type, RepositoryContext repositoryContext) throws DtoTranslationException { Validate.notNull(repo, "Repo object must not be null."); Validate.notNull(jaxb, "JAXB object must not be null."); fromJaxb(jaxb.asPrismContainerValue(), repo, type, repositoryContext); }
clone.extension = ((this.extension == null)?null:((this.getExtension() == null)?null:this.getExtension().clone()));
/** * Create an instance of {@link ExtensionType } * */ public ExtensionType createExtensionType() { return new ExtensionType(); }
@Test public void testExtensionTypeConstruction() throws Exception { System.out.println("\n\n ===[ testExtensionTypeConstruction ]===\n"); // GIVEN PrismContext prismContext = PrismTestUtil.getPrismContext(); GenericObjectType object = new GenericObjectType(); prismContext.adopt(object.asPrismObject(), GenericObjectType.class); ExtensionType extension = new ExtensionType(); object.setExtension(extension); PrismContainerValue extValue = extension.asPrismContainerValue(); assertNotNull("No extension definition", extValue.getParent().getDefinition()); // WHEN Item item = extValue.findOrCreateItem(SchemaTestConstants.EXTENSION_STRING_TYPE_ELEMENT); // THEN assertNotNull(item); object.asPrismObject().checkConsistence(); }
@Override public String toString() { return asPrismContainerValue().toString(); }
this.extension = ((o.extension == null)?null:((o.getExtension() == null)?null:o.getExtension().clone()));
public ExtensionType beginExtension() { ExtensionType value = new ExtensionType(); extension(value); return value; }
ExtensionType extension = new ExtensionType(prismContext); PrismProperty<String> loot = def1.instantiate(); loot.setRealValue("otherString"); extension.asPrismContainerValue().add(loot); .delete(extension.asPrismContainerValue().clone()) .asItemDeltas(); repositoryService.modifyObject(UserType.class, userOid, deltas, result); .add(extension.asPrismContainerValue().clone()) .asItemDeltas(); repositoryService.modifyObject(UserType.class, userOid, deltas, result);
@Override public int hashCode() { return asPrismContainerValue().hashCode(); }