Class PrivilegeDefinitionWriter

java.lang.Object
org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter

public class PrivilegeDefinitionWriter extends Object
Writes privilege definitions to an output stream.
  • Constructor Details

    • PrivilegeDefinitionWriter

      public PrivilegeDefinitionWriter(String contentType)
      Creates a new PrivilegeDefinitionWriter.
      Parameters:
      contentType - The content type used to determine the type of serialization.
      Throws:
      IllegalArgumentException - if the specified content type is not supported.
  • Method Details

    • writeDefinitions

      public void writeDefinitions(OutputStream out, PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces) throws IOException
      Writes the privilege definitions to the specified output stream.
      Parameters:
      out - The output stream.
      privilegeDefinitions - The privilege definitions to write to the given output stream.
      namespaces - The namespace mapping (prefix to uri) used by the specified definitions.
      Throws:
      IOException - If an error occurs.
    • writeDefinitions

      public void writeDefinitions(Writer writer, PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces) throws IOException
      Writes the privilege definitions to the specified output stream.
      Parameters:
      writer - The writer.
      privilegeDefinitions - The privilege definitions to write to the given output stream.
      namespaces - The namespace mapping (prefix to uri) used by the specified definitions.
      Throws:
      IOException - If an error occurs.