Tabnine Logo
DSSDocumentContext.deleteWhenSessionDestroyed
Code IndexAdd Tabnine to your IDE (free)

How to use
deleteWhenSessionDestroyed
method
in
be.fedict.eid.dss.spi.DSSDocumentContext

Best Java code snippets using be.fedict.eid.dss.spi.DSSDocumentContext.deleteWhenSessionDestroyed (Showing top 3 results out of 315)

origin: be.fedict.eid-dss/eid-dss-document-ooxml

public OOXMLSignatureService(InputStream documentInputStream,
    OutputStream documentOutputStream, SignatureFacet signatureFacet,
    String role, IdentityDTO identity, byte[] photo,
    RevocationDataService revocationDataService,
    TimeStampService timeStampService, DigestAlgo signatureDigestAlgo,
    DSSDocumentContext documentContext) throws IOException {
  super(signatureDigestAlgo);
  this.temporaryDataStorage = new HttpSessionTemporaryDataStorage();
  this.documentOutputStream = documentOutputStream;
  this.tmpFile = File.createTempFile("eid-dss-", ".ooxml");
  documentContext.deleteWhenSessionDestroyed(this.tmpFile);
  FileOutputStream fileOutputStream;
  fileOutputStream = new FileOutputStream(this.tmpFile);
  IOUtils.copy(documentInputStream, fileOutputStream);
  addSignatureFacet(signatureFacet);
  addSignatureFacet(new XAdESXLSignatureFacet(timeStampService,
      revocationDataService, getSignatureDigestAlgorithm()));
  XAdESSignatureFacet xadesSignatureFacet = super
      .getXAdESSignatureFacet();
  xadesSignatureFacet.setRole(role);
  if (null != identity) {
    IdentitySignatureFacet identitySignatureFacet = new IdentitySignatureFacet(
        identity, photo, getSignatureDigestAlgorithm());
    addSignatureFacet(identitySignatureFacet);
  }
}
origin: be.fedict.eid-dss/eid-dss-document-odf

this.documentOutputStream = documentOutputStream;
this.tmpFile = File.createTempFile("eid-dss-", ".odf");
documentContext.deleteWhenSessionDestroyed(this.tmpFile);
FileOutputStream fileOutputStream;
fileOutputStream = new FileOutputStream(this.tmpFile);
origin: be.fedict.eid-dss/eid-dss-document-zip

documentContext.deleteWhenSessionDestroyed(this.tmpFile);
FileOutputStream fileOutputStream;
fileOutputStream = new FileOutputStream(this.tmpFile);
be.fedict.eid.dss.spiDSSDocumentContextdeleteWhenSessionDestroyed

Javadoc

Via this method the DSSDocumentService can register files which should be deleted when the corresponding HTTP session is being destroyed. This ensures proper cleanup of all temporary files used by the eID DSS even in the case of unexpected behavior. No error will occur when the file already has been deleted.

Popular methods of DSSDocumentContext

  • getMaxGracePeriod
  • getTimestampMaxOffset
    Used when validating timestamp tokens.
  • getXmlSchema
  • getXmlStyleSheet
  • validate
    Validate the given timestamp token. We perform a historical validation here using the given revocati

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • startActivity (Activity)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now