/** * Create an instance of {@link XmlScriptsType } * */ public XmlScriptsType createXmlScriptsType() { return new XmlScriptsType(); }
/** * Creates a new {@code XmlScriptsType} instance by deeply copying a given {@code XmlScriptsType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public XmlScriptsType(final XmlScriptsType 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 'XmlScriptsType' from 'null'."); } // 'Any' collection. if (o.any!= null) { copyAny(o.getAny(), this.getAny()); } }
public boolean equals(Object object) { final EqualsStrategy strategy = DomAwareEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<Object> theAny; theAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "any", theAny), currentHashCode, theAny); } return currentHashCode; }
return copyOfArray(o); return copyOf(((JAXBElement) o)); } catch (NoSuchMethodException e) { if (o instanceof Serializable) { return copyOf(((Serializable) o));
/** * Copies all values of property {@code Any} deeply. * * @param source * The source to copy from. * @param target * The target to copy {@code source} to. * @throws NullPointerException * if {@code target} is {@code null}. */ @SuppressWarnings("unchecked") private static void copyAny(final List<Object> source, final List<Object> target) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if ((source!= null)&&(!source.isEmpty())) { for (final Iterator<?> it = source.iterator(); it.hasNext(); ) { final Object next = it.next(); if (next instanceof Object) { // CBuiltinLeafInfo: java.lang.Object target.add(copyOf(((Object) next))); continue; } // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'com.evolveum.midpoint.xml.ns._public.common.api_types_3.XmlScriptsType'.")); } } }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public ExecuteScriptsType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final ExecuteScriptsType clone = ((ExecuteScriptsType) super.clone()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.api_types_3.XmlScriptsType clone.xmlScripts = ((this.xmlScripts == null)?null:((this.getXmlScripts() == null)?null:this.getXmlScripts().clone())); // CBuiltinLeafInfo: java.lang.String clone.mslScripts = ((this.mslScripts == null)?null:this.getMslScripts()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.api_types_3.ExecuteScriptsOptionsType clone.options = ((this.options == null)?null:((this.getOptions() == null)?null:this.getOptions().clone())); return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
public int hashCode() { final HashCodeStrategy strategy = DomAwareHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XmlScriptsType)) { return false; } if (this == object) { return true; } final XmlScriptsType that = ((XmlScriptsType) object); { List<Object> lhsAny; lhsAny = (((this.any!= null)&&(!this.any.isEmpty()))?this.getAny():null); List<Object> rhsAny; rhsAny = (((that.any!= null)&&(!that.any.isEmpty()))?that.getAny():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "any", lhsAny), LocatorUtils.property(thatLocator, "any", rhsAny), lhsAny, rhsAny)) { return false; } } return true; }
return copyOf(((boolean[]) array)); return copyOf(((byte[]) array)); return copyOf(((char[]) array)); return copyOf(((double[]) array)); return copyOf(((float[]) array)); return copyOf(((int[]) array)); return copyOf(((long[]) array)); return copyOf(((short[]) array)); Array.set(copy, i, copyOf(Array.get(array, i)));
/** * Creates a new {@code ExecuteScriptsType} instance by deeply copying a given {@code ExecuteScriptsType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public ExecuteScriptsType(final ExecuteScriptsType 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 'ExecuteScriptsType' from 'null'."); } // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.api_types_3.XmlScriptsType this.xmlScripts = ((o.xmlScripts == null)?null:((o.getXmlScripts() == null)?null:o.getXmlScripts().clone())); // CBuiltinLeafInfo: java.lang.String this.mslScripts = ((o.mslScripts == null)?null:o.getMslScripts()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.api_types_3.ExecuteScriptsOptionsType this.options = ((o.options == null)?null:((o.getOptions() == null)?null:o.getOptions().clone())); }
/** * Create an instance of {@link XmlScriptsType } * */ public XmlScriptsType createXmlScriptsType() { return new XmlScriptsType(); }
/** * Creates and returns a deep copy of this object. * * * @return * A deep copy of this object. */ @Override public XmlScriptsType clone() { try { { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 final XmlScriptsType clone = ((XmlScriptsType) super.clone()); // 'Any' collection. if (this.any!= null) { clone.any = null; copyAny(this.getAny(), clone.getAny()); } return clone; } } catch (CloneNotSupportedException e) { // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ throw new AssertionError(e); } }
private List<JAXBElement<?>> parseScripts(ExecuteScriptsType parameters) throws JAXBException, SchemaException { List<JAXBElement<?>> scriptsToExecute = new ArrayList<>(); if (parameters.getXmlScripts() != null) { for (Object scriptAsObject : parameters.getXmlScripts().getAny()) { if (scriptAsObject instanceof JAXBElement) { scriptsToExecute.add((JAXBElement) scriptAsObject); } else { throw new IllegalArgumentException("Invalid script type: " + scriptAsObject.getClass()); } } } else { // here comes MSL script decoding (however with a quick hack to allow passing XML as text here) String scriptsAsString = parameters.getMslScripts(); if (scriptsAsString.startsWith("<?xml")) { PrismProperty<?> expressionType = (PrismProperty) prismContext.parserFor(scriptsAsString).xml().parseItem(); if (expressionType.size() != 1) { throw new IllegalArgumentException("Unexpected number of scripting expressions at input: " + expressionType.size() + " (expected 1)"); } scriptsToExecute.add(expressionType.getAnyValue().toJaxbElement()); } } return scriptsToExecute; }
/** * Creates and returns a deep copy of a given {@code JAXBElement} instance. * * @param element * The instance to copy or {@code null}. * @return * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. */ @SuppressWarnings("unchecked") private static JAXBElement copyOf(final JAXBElement element) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 if (element!= null) { final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); copy.setNil(element.isNil()); copy.setValue(copyOf(copy.getValue())); return copy; } return null; }
/** * Create an instance of {@link XmlScriptsType } * */ public XmlScriptsType createXmlScriptsType() { return new XmlScriptsType(); }
public XmlScriptsType beginXmlScripts() { XmlScriptsType value = new XmlScriptsType(); xmlScripts(value); return value; }