Class PrivilegeDefinitionWriter
java.lang.Object
org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter
Writes privilege definitions to an output stream.
-
Constructor Summary
ConstructorsConstructorDescriptionPrivilegeDefinitionWriter(String contentType) Creates a newPrivilegeDefinitionWriter. -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteDefinitions(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 Details
-
PrivilegeDefinitionWriter
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 Details
-
writeDefinitions
public void writeDefinitions(OutputStream out, PrivilegeDefinition[] privilegeDefinitions, Map<String, String> namespaces) throws IOExceptionWrites 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 IOExceptionWrites 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.
-