org.opencrx.kernel.layer.persistence
Class Audit_1

java.lang.Object
  extended by org.openmdx.application.dataprovider.spi.Layer_1
      extended by org.openmdx.application.dataprovider.spi.OperationAwareLayer_1
          extended by org.openmdx.application.dataprovider.layer.persistence.common.AbstractPersistence_1
              extended by org.openmdx.application.dataprovider.layer.persistence.jdbc.AbstractDatabase_1
                  extended by org.openmdx.application.dataprovider.layer.persistence.jdbc.Database_1
                      extended by org.opencrx.kernel.layer.persistence.Indexed_1
                          extended by org.opencrx.kernel.layer.persistence.Audit_1
All Implemented Interfaces:
org.openmdx.application.dataprovider.cci.Dataprovider_1_0, org.openmdx.application.dataprovider.layer.persistence.jdbc.DataTypes, Port

public class Audit_1
extends Indexed_1

This plugin creates audit entries for modified objects.


Nested Class Summary
 class Audit_1.LayerInteraction
           
 
Field Summary
protected  Map<org.openmdx.base.naming.Path,Boolean> auditSegments
           
protected static String NOT_VISITED_SUFFIX
           
protected  List<String> visitorIds
           
 
Fields inherited from class org.opencrx.kernel.layer.persistence.Indexed_1
BATCH_SIZE, indexableTypes, INDEXED_ATTRIBUTES, MAX_KEYWORD_LENGTH, MIN_KEYWORD_LENGTH
 
Fields inherited from class org.openmdx.application.dataprovider.layer.persistence.jdbc.AbstractDatabase_1
allowsSqlSequenceFallback, AUTOINC_FORMAT_AUTO, AUTOINC_FORMAT_NEXT_VALUE_FOR, AUTOINC_FORMAT_NEXTVAL, AUTOINC_FORMAT_NEXTVAL_FOR, AUTOINC_FORMAT_SEQUENCE, BATCH_MODE_SIZE_MAX, BATCH_MODE_SIZE_MIN, batchSize, booleanMarshaller, booleanType, calendarMarshaller, columnNames, configuration, dataSources, dateTimeType, dateType, DEFAULT_BATCH_SIZE, DEFAULT_COLUMN_SELECTOR, DEFAULT_OID_SUFFIX, DEFAULT_RID_SUFFIX, durationMarshaller, embeddedFeatures, featureNames, fetchSize, ignoreCheckForDuplicates, JDBC_DRIVER_SQL_PROPERTIES, jdbcDriverSqlProperties, JDO_CASE_INSENSITIVE_FLAG, maxReferenceComponents, namespaceId, nonPersistentFeatures, nullAsCharacter, OBJECT_ID, OBJECT_IDX, OBJECT_OID, OBJECT_RID, objectIdAttributesSuffix, pathMacros, privateAttributesPrefix, QUALIFIED_SYSTEM_ATTRIBUTES, referenceIdAttributesSuffix, referenceIdFormat, referenceLookupStatementHint, RESERVED_WORDS_HSQLDB, resultSetType, ROUND_UP_TO_MAX_SCALE, setSizeColumns, singleValueAttributes, sqlWildacrds, stringMacros, supportsSqlNumericNullCast, SYSTEM_ATTRIBUTES, T_REF, temporaryFiles, timeType, UNDEF_OBJECT_CLASS, useNormalizedReferences, VIEW_MODE_ADD_MIXIN_COLUMNS_TO_PRIMARY, VIEW_MODE_SECONDARY_COLUMNS
 
Fields inherited from class org.openmdx.application.dataprovider.layer.persistence.common.AbstractPersistence_1
DEFAULT_CHUNK_SIZE
 
Fields inherited from class org.openmdx.application.dataprovider.spi.Layer_1
compressUID, delegation
 
Constructor Summary
Audit_1()
           
 
Method Summary
 void activate(short id, org.openmdx.application.configuration.Configuration configuration, org.openmdx.application.dataprovider.spi.Layer_1 delegation)
           
protected  MappedRecord createResult(org.openmdx.application.dataprovider.cci.DataproviderRequest request, String structName)
           
 String getBeforeImageAsString(MappedRecord beforeImage)
           
protected  Set<String> getChangedAttributes(MappedRecord o1, MappedRecord o2)
          Return the set of attributes which's values changed in o2 relative to o1.
 Interaction getInteraction(Connection connection)
           
protected  String getQualifiedPrincipalName(org.openmdx.base.naming.Path accessPath, String principalName)
           
protected  boolean isAuditee(MappedRecord object)
           
protected  boolean isInstanceOfBasicObject(MappedRecord object)
           
protected  void setSecurityAttributes(MappedRecord auditEntry)
           
protected  void setSystemAttributes(org.openmdx.application.dataprovider.cci.ServiceHeader header, MappedRecord object, short operation)
           
 
Methods inherited from class org.opencrx.kernel.layer.persistence.Indexed_1
getKeywords, isAccountAddress
 
Methods inherited from class org.openmdx.application.dataprovider.layer.persistence.jdbc.AbstractDatabase_1
addBeforeImage, closeConnection, completeObject, completeReply, create, createBlob, createClob, createDbObject, createDbObject, escape, executeQuery, executeUpdate, externalizePathValue, externalizeStringValue, filterToSqlClause, filterToSqlClause, get, getAutonumValue, getBooleanType, getConnection, getDataSource, getDateTimeType, getDateType, getDbObject, getEscapeClause, getFeatureName, getFilterPropertyDefs, getLockAssertion, getObjects, getPartialObject, getPrimaryFilterProperties, getReference, getReferenceIdFormat, getSelectReferenceIdsClause, getTimeType, getVersion, getVersionField, getVersionValue, getView, internalizePathValue, internalizeStringValue, isSetSizeColumns, mapInstanceOfFilterProperty, normalizeDateTimeValues, prepareStatement, removePrivateAttributes, removeViewPrefix, setPreparedStatementValue, setValue, setValue, toPattern, unescape, useNormalizedReferences
 
Methods inherited from class org.openmdx.application.dataprovider.layer.persistence.common.AbstractPersistence_1
getAllSubtypes, getChunkSize, getStreamBufferDirectory, isSequenceSupported
 
Methods inherited from class org.openmdx.application.dataprovider.spi.OperationAwareLayer_1
getConfigurationValue, getConfigurationValue
 
Methods inherited from class org.openmdx.application.dataprovider.spi.Layer_1
configurationSpecification, deactivate, getConfiguration, getConnectionFactory, getDelegation, getId, getModel, newReplyId, process, terminal, uidAsString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_VISITED_SUFFIX

protected static final String NOT_VISITED_SUFFIX
See Also:
Constant Field Values

auditSegments

protected final Map<org.openmdx.base.naming.Path,Boolean> auditSegments

visitorIds

protected final List<String> visitorIds
Constructor Detail

Audit_1

public Audit_1()
Method Detail

getInteraction

public Interaction getInteraction(Connection connection)
                           throws ResourceException
Specified by:
getInteraction in interface Port
Overrides:
getInteraction in class Indexed_1
Throws:
ResourceException

activate

public void activate(short id,
                     org.openmdx.application.configuration.Configuration configuration,
                     org.openmdx.application.dataprovider.spi.Layer_1 delegation)
              throws ServiceException
Overrides:
activate in class Indexed_1
Throws:
ServiceException

isAuditee

protected boolean isAuditee(MappedRecord object)
                     throws ServiceException
Throws:
ServiceException

isInstanceOfBasicObject

protected boolean isInstanceOfBasicObject(MappedRecord object)

getQualifiedPrincipalName

protected String getQualifiedPrincipalName(org.openmdx.base.naming.Path accessPath,
                                           String principalName)

setSecurityAttributes

protected void setSecurityAttributes(MappedRecord auditEntry)
                              throws ServiceException
Throws:
ServiceException

setSystemAttributes

protected void setSystemAttributes(org.openmdx.application.dataprovider.cci.ServiceHeader header,
                                   MappedRecord object,
                                   short operation)
                            throws ServiceException
Throws:
ServiceException

createResult

protected MappedRecord createResult(org.openmdx.application.dataprovider.cci.DataproviderRequest request,
                                    String structName)
                             throws ServiceException
Overrides:
createResult in class Indexed_1
Throws:
ServiceException

getChangedAttributes

protected Set<String> getChangedAttributes(MappedRecord o1,
                                           MappedRecord o2)
                                    throws ServiceException
Return the set of attributes which's values changed in o2 relative to o1.

Throws:
ServiceException

getBeforeImageAsString

public String getBeforeImageAsString(MappedRecord beforeImage)
                              throws ServiceException
Throws:
ServiceException


This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.