All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.xml.crypto.dsig.dom.DOMSignContext Maven / Gradle / Ivy

The newest version!
/*     */ package javax.xml.crypto.dsig.dom;
/*     */ 
/*     */ import java.security.Key;
/*     */ import javax.xml.crypto.KeySelector;
/*     */ import javax.xml.crypto.dom.DOMCryptoContext;
/*     */ import javax.xml.crypto.dsig.XMLSignContext;
/*     */ import org.w3c.dom.Node;
/*     */ 
/*     */ public class DOMSignContext extends DOMCryptoContext
/*     */   implements XMLSignContext
/*     */ {
/*     */   private Node parent;
/*     */   private Node nextSibling;
/*     */ 
/*     */   public DOMSignContext(Key signingKey, Node parent)
/*     */   {
/*  51 */     if (signingKey == null) {
/*  52 */       throw new NullPointerException("signingKey cannot be null");
/*     */     }
/*  54 */     if (parent == null) {
/*  55 */       throw new NullPointerException("parent cannot be null");
/*     */     }
/*  57 */     setKeySelector(KeySelector.singletonKeySelector(signingKey));
/*  58 */     this.parent = parent;
/*     */   }
/*     */ 
/*     */   public DOMSignContext(Key signingKey, Node parent, Node nextSibling)
/*     */   {
/*  77 */     if (signingKey == null) {
/*  78 */       throw new NullPointerException("signingKey cannot be null");
/*     */     }
/*  80 */     if (parent == null) {
/*  81 */       throw new NullPointerException("parent cannot be null");
/*     */     }
/*  83 */     if (nextSibling == null) {
/*  84 */       throw new NullPointerException("nextSibling cannot be null");
/*     */     }
/*  86 */     setKeySelector(KeySelector.singletonKeySelector(signingKey));
/*  87 */     this.parent = parent;
/*  88 */     this.nextSibling = nextSibling;
/*     */   }
/*     */ 
/*     */   public DOMSignContext(KeySelector ks, Node parent)
/*     */   {
/* 104 */     if (ks == null) {
/* 105 */       throw new NullPointerException("key selector cannot be null");
/*     */     }
/* 107 */     if (parent == null) {
/* 108 */       throw new NullPointerException("parent cannot be null");
/*     */     }
/* 110 */     setKeySelector(ks);
/* 111 */     this.parent = parent;
/*     */   }
/*     */ 
/*     */   public DOMSignContext(KeySelector ks, Node parent, Node nextSibling)
/*     */   {
/* 127 */     if (ks == null) {
/* 128 */       throw new NullPointerException("key selector cannot be null");
/*     */     }
/* 130 */     if (parent == null) {
/* 131 */       throw new NullPointerException("parent cannot be null");
/*     */     }
/* 133 */     if (nextSibling == null) {
/* 134 */       throw new NullPointerException("nextSibling cannot be null");
/*     */     }
/* 136 */     setKeySelector(ks);
/* 137 */     this.parent = parent;
/* 138 */     this.nextSibling = nextSibling;
/*     */   }
/*     */ 
/*     */   public void setParent(Node parent)
/*     */   {
/* 150 */     if (parent == null) {
/* 151 */       throw new NullPointerException("parent is null");
/*     */     }
/* 153 */     this.parent = parent;
/*     */   }
/*     */ 
/*     */   public void setNextSibling(Node nextSibling)
/*     */   {
/* 165 */     this.nextSibling = nextSibling;
/*     */   }
/*     */ 
/*     */   public Node getParent()
/*     */   {
/* 175 */     return this.parent;
/*     */   }
/*     */ 
/*     */   public Node getNextSibling()
/*     */   {
/* 185 */     return this.nextSibling;
/*     */   }
/*     */ }

/* Location:           E:\HYN\Java\trunk\ref\lib-dep\xmldsig\xmldsig.jar
 * Qualified Name:     javax.xml.crypto.dsig.dom.DOMSignContext
 * JD-Core Version:    0.6.2
 */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy