Package org.nuxeo.ecm.directory.impl
Class WritePolicyEntryAdaptor
java.lang.Object
org.nuxeo.ecm.directory.impl.WritePolicyEntryAdaptor
- All Implemented Interfaces:
EntryAdaptor
Simple entry adaptor implementation that leaves the entry as editable if the specified field value matches the
provided regexp or set the readonly flag of the entry to true if the value of the field does not match the regexp.
In any case, if the readonly flag of the adapted entry is already set to true, this value is kept unchanged.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadapt(Directory directory, DocumentModel entry) Apply an arbitrary transformation of the fetched entry.voidsetParameter(String name, String value) Allow the directory initialization process to configure the adaptor by providing String valued parameters.
-
Field Details
-
fieldName
-
pattern
-
-
Constructor Details
-
WritePolicyEntryAdaptor
public WritePolicyEntryAdaptor()
-
-
Method Details
-
adapt
Description copied from interface:EntryAdaptorApply an arbitrary transformation of the fetched entry.- Specified by:
adaptin interfaceEntryAdaptor- Parameters:
directory- the directory instance the entry is fetched fromentry- the entry to transform- Returns:
- the adapted entry
-
setParameter
Description copied from interface:EntryAdaptorAllow the directory initialization process to configure the adaptor by providing String valued parameters.- Specified by:
setParameterin interfaceEntryAdaptor
-