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 Summary
Constructors Constructor Description PrivilegeDefinitionWriter(String contentType)Creates a newPrivilegeDefinitionWriter. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteDefinitions(OutputStream out, PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces)Writes the privilege definitions to the specified output stream.voidwriteDefinitions(Writer writer, PrivilegeDefinition[] privilegeDefinitions, Map<String,String> namespaces)Writes the privilege definitions to the specified output stream. 
 - 
 
- 
- 
Constructor Detail
- 
PrivilegeDefinitionWriter
public PrivilegeDefinitionWriter(String contentType)
Creates a newPrivilegeDefinitionWriter.- 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, 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.
 
 - 
 
 -