Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory.impl
Class WritePolicyEntryAdaptor

java.lang.Object
  extended by org.nuxeo.ecm.directory.impl.WritePolicyEntryAdaptor
All Implemented Interfaces:
EntryAdaptor

public class WritePolicyEntryAdaptor
extends Object
implements 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
static Log log
           
 
Constructor Summary
WritePolicyEntryAdaptor()
           
 
Method Summary
 DocumentModel adapt(Directory directory, DocumentModel entry)
          Apply an arbitrary transformation of the fetched entry.
 void setParameter(String name, String value)
          Allow the directory initialization process to configure the adaptor by providing String valued parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final Log log
Constructor Detail

WritePolicyEntryAdaptor

public WritePolicyEntryAdaptor()
Method Detail

adapt

public DocumentModel adapt(Directory directory,
                           DocumentModel entry)
                    throws DirectoryException
Description copied from interface: EntryAdaptor
Apply an arbitrary transformation of the fetched entry.

Specified by:
adapt in interface EntryAdaptor
Parameters:
directory - the directory instance the entry is fetched from
entry - the entry to transform
Returns:
the adapted entry
Throws:
DirectoryException - if the adapting process fails unexpectedly

setParameter

public void setParameter(String name,
                         String value)
Description copied from interface: EntryAdaptor
Allow the directory initialization process to configure the adaptor by providing String valued parameters.

Specified by:
setParameter in interface EntryAdaptor

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.