Path: blob/master/src/java.xml.crypto/share/classes/javax/xml/crypto/URIDereferencer.java
41159 views
/*1* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/*26* ===========================================================================27*28* (C) Copyright IBM Corp. 2003 All Rights Reserved.29*30* ===========================================================================31*/32/*33* $Id: URIDereferencer.java,v 1.5 2005/05/10 15:47:42 mullan Exp $34*/35package javax.xml.crypto;3637/**38* A dereferencer of {@link URIReference}s.39* <p>40* The result of dereferencing a <code>URIReference</code> is either an41* instance of {@link OctetStreamData} or {@link NodeSetData}. Unless the42* <code>URIReference</code> is a <i>same-document reference</i> as defined43* in section 4.2 of the W3C Recommendation for XML-Signature Syntax and44* Processing, the result of dereferencing the <code>URIReference</code>45* MUST be an <code>OctetStreamData</code>.46*47* @author Sean Mullan48* @author Joyce Leung49* @author JSR 105 Expert Group50* @since 1.651* @see XMLCryptoContext#setURIDereferencer(URIDereferencer)52* @see XMLCryptoContext#getURIDereferencer53*/54public interface URIDereferencer {5556/**57* Dereferences the specified <code>URIReference</code> and returns the58* dereferenced data.59*60* @param uriReference the <code>URIReference</code>61* @param context an <code>XMLCryptoContext</code> that may62* contain additional useful information for dereferencing the URI. This63* implementation should dereference the specified64* <code>URIReference</code> against the context's <code>baseURI</code>65* parameter, if specified.66* @return the dereferenced data67* @throws NullPointerException if <code>uriReference</code> or68* <code>context</code> are <code>null</code>69* @throws URIReferenceException if an exception occurs while70* dereferencing the specified <code>uriReference</code>71*/72Data dereference(URIReference uriReference, XMLCryptoContext context)73throws URIReferenceException;74}757677