org.apache.jackrabbit.spi.commons.privilege
Class PrivilegeDefinitionWriter

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

public class PrivilegeDefinitionWriter
extends Object

Writes privilege definitions to an output stream.


Constructor Summary
PrivilegeDefinitionWriter(String contentType)
          Creates a new PrivilegeDefinitionWriter.
 
Method Summary
 void writeDefinitions(OutputStream out, org.apache.jackrabbit.spi.PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces)
          Writes the privilege definitions to the specified output stream.
 void writeDefinitions(Writer writer, org.apache.jackrabbit.spi.PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces)
          Writes the privilege definitions to the specified output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

writeDefinitions

public void writeDefinitions(OutputStream out,
                             org.apache.jackrabbit.spi.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,
                             org.apache.jackrabbit.spi.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.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.