List<XMLStructure> objectContentList = object.getContent(); for (XMLStructure objectContent : objectContentList) { LOG.log(POILogger.DEBUG, "object content java type: " + objectContent.getClass().getName());
public static void marshal(XmlWriter xwriter, XMLObject xmlObj, String dsPrefix, XMLCryptoContext context) throws MarshalException { xwriter.writeStartElement(dsPrefix, "Object", XMLSignature.XMLNS); // set attributes xwriter.writeIdAttribute("", "", "Id", xmlObj.getId()); xwriter.writeAttribute("", "", "MimeType", xmlObj.getMimeType()); xwriter.writeAttribute("", "", "Encoding", xmlObj.getEncoding()); // create and append any elements and mixed content, if necessary @SuppressWarnings("unchecked") List<XMLStructure> content = xmlObj.getContent(); for (XMLStructure object : content) { xwriter.marshalStructure(object, dsPrefix, context); } xwriter.writeEndElement(); // "Object" }
XMLObject idPackageObject = null; for (XMLObject object : objects) { if ("idPackageObject".equals(object.getId())) { idPackageObject = object; break; continue; List<XMLStructure> idPackageObjectContent = idPackageObject.getContent(); Manifest idPackageObjectManifest = null; for (XMLStructure content : idPackageObjectContent) {
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof XMLObject)) { return false; } XMLObject oxo = (XMLObject)o; boolean idsEqual = id == null ? oxo.getId() == null : id.equals(oxo.getId()); boolean encodingsEqual = encoding == null ? oxo.getEncoding() == null : encoding.equals(oxo.getEncoding()); boolean mimeTypesEqual = mimeType == null ? oxo.getMimeType() == null : mimeType.equals(oxo.getMimeType()); return idsEqual && encodingsEqual && mimeTypesEqual && equalsContent(getXmlObjectContent(oxo)); }
@SuppressWarnings("unchecked") private XMLObject findObject(XMLSignature xmlSignature, String objectId) { List<XMLObject> objects = xmlSignature.getObjects(); for (XMLObject object : objects) { if (objectId.equals(object.getId())) { LOG.debug("Found \"" + objectId + "\" ds:object"); return object; } } return null; }
signatureIdMap.put(obj.getId(), obj); List<XMLStructure> content = DOMXMLObject.getXmlObjectContent(obj); for (XMLStructure xs : content) {
@SuppressWarnings("unchecked") public static List<XMLStructure> getXmlObjectContent(XMLObject xo) { return xo.getContent(); }
if (1 != idOfficeObject.getContent().size()) { LOG.error("Expect SignatureProperties element in \"idPackageObject\"."); return false; signatureProperties = (SignatureProperties) idOfficeObject.getContent().get(0);
if (2 != idPackageObject.getContent().size()) { LOG.error("Expect Manifest + SignatureProperties elements in \"idPackageObject\"."); return false; manifest = (Manifest) idPackageObject.getContent().get(0); signatureProperties = (SignatureProperties) idPackageObject.getContent().get(1);
if (object instanceof XMLObject) { XMLObject xmlObject = (XMLObject)object; for (Object xmlStructure : xmlObject.getContent()) { if (xmlStructure instanceof Manifest) { throw new WSSecurityException(
if (object instanceof XMLObject) { XMLObject xmlObject = (XMLObject)object; for (Object xmlStructure : xmlObject.getContent()) { if (xmlStructure instanceof Manifest) { throw new WSSecurityException(
List<XMLStructure> objectContentList = object.getContent(); for (XMLStructure objectContent : objectContentList) { LOG.debug("object content java type: " + objectContent.getClass().getName());
if (object instanceof XMLObject) { XMLObject xmlObject = (XMLObject)object; for (Object xmlStructure : xmlObject.getContent()) { if (xmlStructure instanceof Manifest) { bspEnforcer.handleBSPRule(BSPRule.R5403);
List<XMLStructure> objectContentList = object.getContent(); for (XMLStructure objectContent : objectContentList) { LOG.log(POILogger.DEBUG, "object content java type: " + objectContent.getClass().getName());