package com.sun.identity.saml2.assertion.impl;

import com.sun.identity.saml2.assertion.OneTimeUse;
import com.sun.identity.saml2.common.SAML2Exception;
import org.w3c.dom.Element;

public class OneTimeUseImpl extends ConditionAbstractImpl implements OneTimeUse {
   public static final String ONETIMEUSE_ELEMENT = "OneTimeUse";

   public OneTimeUseImpl() {
   }

   public OneTimeUseImpl(String xml) {
   }

   public OneTimeUseImpl(Element element) {
   }

   @Override
   public String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception {
      StringBuilder sb = new StringBuilder(2000);
      String ns = "";
      String appendNS = "";
      if (declareNS) {
         ns = " xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\"";
      }

      if (includeNSPrefix) {
         appendNS = "saml:";
      }

      sb.append("<").append(appendNS).append("OneTimeUse").append(ns).append(" />\n");
      return sb.toString();
   }
}
