|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.transformations.ExcludeAttributeTransformation
@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ExcludeAttributeTransformation
This class provides an implementation of an entry and LDIF change record transformation that will remove a specified set of attributes from entries or change records. Note that this transformation will not alter entry DNs, so if an attribute to exclude is included in an entry's DN, that value will still be visible in the DN even if it is removed from the set of attributes in the entry.
Constructor Summary | |
---|---|
ExcludeAttributeTransformation(Schema schema,
java.util.Collection<java.lang.String> attributes)
Creates a new exclude attribute transformation that will strip the specified attributes out of entries and change records. |
|
ExcludeAttributeTransformation(Schema schema,
java.lang.String... attributes)
Creates a new exclude attribute transformation that will strip the specified attributes out of entries and change records. |
Method Summary | |
---|---|
LDIFChangeRecord |
transformChangeRecord(LDIFChangeRecord r)
Applies an appropriate transformation to the provided LDIF change record. |
Entry |
transformEntry(Entry e)
Applies an appropriate transformation to the provided entry. |
Entry |
translate(Entry original,
long firstLineNumber)
Applies some special transformation or filtering to the original Entry. |
LDIFChangeRecord |
translate(LDIFChangeRecord original,
long firstLineNumber)
Applies some special transformation or filtering to the original change record. |
LDIFChangeRecord |
translateChangeRecordToWrite(LDIFChangeRecord original)
Applies some special transformation or filtering to the original change record. |
Entry |
translateEntryToWrite(Entry original)
Applies some special transformation or filtering to the original Entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExcludeAttributeTransformation(Schema schema, java.lang.String... attributes)
schema
- The scheme to use to identify alternate names that
may be used to reference the attributes to exclude from
entries. It may be null
to use a default
standard schema.attributes
- The names of the attributes to strip from entries and
change records. It must not be null
or empty.public ExcludeAttributeTransformation(Schema schema, java.util.Collection<java.lang.String> attributes)
schema
- The scheme to use to identify alternate names that
may be used to reference the attributes to exclude from
entries. It may be null
to use a default
standard schema.attributes
- The names of the attributes to strip from entries and
change records. It must not be null
or empty.Method Detail |
---|
public Entry transformEntry(Entry e)
transformEntry
in interface EntryTransformation
e
- The entry to transform.
null
if the entry should be suppressed.public LDIFChangeRecord transformChangeRecord(LDIFChangeRecord r)
transformChangeRecord
in interface LDIFChangeRecordTransformation
r
- The LDIF change record to transform.
null
if the change record should be
suppressed.public Entry translate(Entry original, long firstLineNumber)
translate
in interface LDIFReaderEntryTranslator
original
- The original Entry that was read and parsed from
the input file.firstLineNumber
- The first line number of the LDIF record
corresponding to the read Entry. This is most
useful when throwing an LDIFException.
LDIFReader.readEntry()
. This can be the original parameter
Entry, a newly constructed Entry, or null
to signal that
the provided Entry should be skipped.public LDIFChangeRecord translate(LDIFChangeRecord original, long firstLineNumber)
translate
in interface LDIFReaderChangeRecordTranslator
original
- The original change record that was read and
parsed from the input file.firstLineNumber
- The first line number of the LDIF change record.
This is most useful when throwing an
LDIFException
.
LDIFReader.readChangeRecord()
. This can be the original
parameter change record, a newly constructed change record, or
null
to signal that the provided change record should be
skipped.public Entry translateEntryToWrite(Entry original)
translateEntryToWrite
in interface LDIFWriterEntryTranslator
original
- The original Entry that was to be written.
null
to
signal that this Entry should not be written. Note, however, that
if the original entry provided as a parameter is altered, then
the change will be visible to anything that references that entry.
If you are not sure about whether changes to the original entry
are acceptable, it is recommended that you use the
duplicate()
method to create a copy of the original and
make the necessary changes to that duplicate.public LDIFChangeRecord translateChangeRecordToWrite(LDIFChangeRecord original)
translateChangeRecordToWrite
in interface LDIFWriterChangeRecordTranslator
original
- The original change record that was to be written.
null
to signal that the change record should
not be written. Note, however, that if the original record
provided as a parameter is altered, then the change will be
visible to anything that references that change record. If you
are not sure about whether changes to the original change record
are acceptable, it is recommended that you use the
duplicate()
method to create a copy of the original and
make the necessary changes to that duplicate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |