Class ODefaultAuditing
java.lang.Object
com.orientechnologies.security.auditing.ODefaultAuditing
- All Implemented Interfaces:
ODatabaseLifecycleListener,OAuditingService,OSecurityComponent,ODistributedLifecycleListener
public class ODefaultAuditing
extends Object
implements OAuditingService, ODatabaseLifecycleListener, ODistributedLifecycleListener
Created by Enrico Risa on 10/04/15.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.db.ODatabaseLifecycleListener
ODatabaseLifecycleListener.PRIORITY -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactive()voidchangeConfig(OSecurityUser user, String iDatabaseName, ODocument cfg) voidconfig(ODocument jsonConfig, OSecuritySystem security) voiddispose()static StringgetClassName(String dbName) static StringgetClusterName(String dbName) Deprecated.getString(InputStream is) booleanvoidlog(OAuditingOperation operation, OSecurityUser user, String message) Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).voidlog(OAuditingOperation operation, String message) Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).voidlog(OAuditingOperation operation, String dbName, OSecurityUser user, String message) Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).voidonClose(ODatabaseInternal iDatabase) voidonCreate(ODatabaseInternal iDatabase) voidonCreateClass(ODatabaseInternal iDatabase, OClass iClass) voidonDatabaseChangeStatus(String iNode, String iDatabaseName, ODistributedServerManager.DB_STATUS iNewStatus) Called upon change of database status on a node.voidonDrop(ODatabaseInternal iDatabase) voidonDropClass(ODatabaseInternal iDatabase, OClass iClass) voidonNodeJoined(String iNode) Called right after a node joined the cluster.booleanonNodeJoining(String iNode) Called when a node is joining the cluster.voidonNodeLeft(String iNode) Called right after a node left the cluster.voidonOpen(ODatabaseInternal iDatabase) voidvoidretainLogs(Date date) protected voidupdateConfigOnDisk(String iDatabaseName, ODocument cfg) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.db.ODatabaseLifecycleListener
onCreateView, onDropView, onLocalNodeConfigurationRequestMethods inherited from interface com.orientechnologies.orient.server.distributed.ODistributedLifecycleListener
onMessageAfterOp, onMessageBeforeOp, onMessageCurrentPayload, onMessageProcessEnd, onMessageProcessStart, onMessageReceived
-
Field Details
-
AUDITING_LOG_CLASSNAME
- See Also:
-
DEFAULT_FILE_AUDITING_DB_CONFIG
- See Also:
-
FILE_AUDITING_DB_CONFIG
- See Also:
-
IMPORTER_FLAG
- See Also:
-
-
Constructor Details
-
ODefaultAuditing
public ODefaultAuditing()
-
-
Method Details
-
getPriority
- Specified by:
getPriorityin interfaceODatabaseLifecycleListener
-
onCreate
- Specified by:
onCreatein interfaceODatabaseLifecycleListener
-
getString
-
onOpen
- Specified by:
onOpenin interfaceODatabaseLifecycleListener
-
onClose
- Specified by:
onClosein interfaceODatabaseLifecycleListener
-
onDrop
- Specified by:
onDropin interfaceODatabaseLifecycleListener
-
onCreateClass
- Specified by:
onCreateClassin interfaceODatabaseLifecycleListener
-
onDropClass
- Specified by:
onDropClassin interfaceODatabaseLifecycleListener
-
updateConfigOnDisk
- Throws:
IOException
-
onNodeJoining
Description copied from interface:ODistributedLifecycleListenerCalled when a node is joining the cluster. Return false to deny the join.- Specified by:
onNodeJoiningin interfaceODistributedLifecycleListener- Parameters:
iNode- Node name that is joining- Returns:
- true to allow the join, otherwise false
-
onNodeJoined
Description copied from interface:ODistributedLifecycleListenerCalled right after a node joined the cluster.- Specified by:
onNodeJoinedin interfaceODistributedLifecycleListener- Parameters:
iNode- Node name that is joining
-
onNodeLeft
Description copied from interface:ODistributedLifecycleListenerCalled right after a node left the cluster.- Specified by:
onNodeLeftin interfaceODistributedLifecycleListener- Parameters:
iNode- Node name that left
-
onDatabaseChangeStatus
public void onDatabaseChangeStatus(String iNode, String iDatabaseName, ODistributedServerManager.DB_STATUS iNewStatus) Description copied from interface:ODistributedLifecycleListenerCalled upon change of database status on a node. Available statuses are defined in ODistributedServerManager.DB_STATUS.- Specified by:
onDatabaseChangeStatusin interfaceODistributedLifecycleListener- Parameters:
iNode- The node nameiDatabaseName- Database nameiNewStatus- The new status
-
getClusterName
Deprecated. -
getClassName
-
changeConfig
public void changeConfig(OSecurityUser user, String iDatabaseName, ODocument cfg) throws IOException - Specified by:
changeConfigin interfaceOAuditingService- Throws:
IOException
-
getConfig
- Specified by:
getConfigin interfaceOAuditingService
-
log
Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).- Specified by:
login interfaceOAuditingService
-
log
Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).- Specified by:
login interfaceOAuditingService
-
log
Primarily used for global logging events (e.g., NODEJOINED, NODELEFT).- Specified by:
login interfaceOAuditingService
-
active
public void active()- Specified by:
activein interfaceOSecurityComponent
-
retainLogs
public void retainLogs() -
retainLogs
-
config
- Specified by:
configin interfaceOSecurityComponent
-
dispose
public void dispose()- Specified by:
disposein interfaceOSecurityComponent
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceOSecurityComponent
-