Class PrivilegeDefinitionWriter
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter
-
public class PrivilegeDefinitionWriter extends java.lang.Object
Writes privilege definitions to an output stream.
-
-
Constructor Summary
Constructors Constructor Description PrivilegeDefinitionWriter(java.lang.String contentType)
Creates a newPrivilegeDefinitionWriter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writeDefinitions(java.io.OutputStream out, PrivilegeDefinition[] privilegeDefinitions, java.util.Map<java.lang.String,java.lang.String> namespaces)
Writes the privilege definitions to the specified output stream.void
writeDefinitions(java.io.Writer writer, PrivilegeDefinition[] privilegeDefinitions, java.util.Map<java.lang.String,java.lang.String> namespaces)
Writes the privilege definitions to the specified output stream.
-
-
-
Constructor Detail
-
PrivilegeDefinitionWriter
public PrivilegeDefinitionWriter(java.lang.String contentType)
Creates a newPrivilegeDefinitionWriter
.- Parameters:
contentType
- The content type used to determine the type of serialization.- Throws:
java.lang.IllegalArgumentException
- if the specified content type is not supported.
-
-
Method Detail
-
writeDefinitions
public void writeDefinitions(java.io.OutputStream out, PrivilegeDefinition[] privilegeDefinitions, java.util.Map<java.lang.String,java.lang.String> namespaces) throws java.io.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:
java.io.IOException
- If an error occurs.
-
writeDefinitions
public void writeDefinitions(java.io.Writer writer, PrivilegeDefinition[] privilegeDefinitions, java.util.Map<java.lang.String,java.lang.String> namespaces) throws java.io.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:
java.io.IOException
- If an error occurs.
-
-