Package org.openiam.authmanager.dao.impl
Class AuthManagerDAOImpl
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.jdbc.core.support.JdbcDaoSupport
-
- org.openiam.common.authmanager.jdbc.impl.AbstractJDBCDao
-
- org.openiam.authmanager.dao.impl.AuthManagerDAOImpl
-
- All Implemented Interfaces:
AuthManagerDAO,org.springframework.beans.factory.InitializingBean
@Repository public class AuthManagerDAOImpl extends AbstractJDBCDao implements AuthManagerDAO
-
-
Field Summary
-
Fields inherited from class org.openiam.common.authmanager.jdbc.impl.AbstractJDBCDao
log, schemaName
-
-
Constructor Summary
Constructors Constructor Description AuthManagerDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getEdgeIds()Map<EdgeVertexType,Set<String>>getExpiredEdgeIds(Date now)Map<VertexType,Map<String,String>>getGraphVertexIds()protected voidinitSqlStatements()voidnullOutEdges(Map<EdgeVertexType,Set<String>> edgeIdentity2EdgeIdMap)The name of this method is somewhat misleading.StringselectGraphId(VertexType type, String openiamid)voidupdateEdge(String membershipId, String rightId, String edgeId, VertexType parentType, VertexType childType)Updates the EDGE_ID field in the database, based on the membership id and right id The parentType and childType VertexTypes will dictate which XREF table gets updatedvoidupdateEdges(List<RightAwareEdgeDatabaseTuple> rightAwareEdgeDatabaseTuple, VertexType parentType, VertexType childType)Batch updates the necessary database right xref database table The parentType and childType VertexTypes will dictate which XREF table gets updatedvoidupdateEdgesWithoutRights(List<RightAwareEdgeDatabaseTuple> edgeDatabaseTuples, VertexType parentType, VertexType childType)Batch updates the necessary database right xref database table The parentType and childType VertexTypes will dictate which XREF table gets updatedvoidupdateGraphId(VertexType type, String id, String graphId)Updates the underlying GraphID property in the database.voidupdateGraphId(VertexType type, List<Tuple<String,String>> id2GraphIdMap)Updates the underlying GraphID property in the database.-
Methods inherited from class org.openiam.common.authmanager.jdbc.impl.AbstractJDBCDao
getSchemaName, initDataSource
-
-
-
-
Method Detail
-
initSqlStatements
protected void initSqlStatements()
- Specified by:
initSqlStatementsin classAbstractJDBCDao
-
updateGraphId
public void updateGraphId(VertexType type, String id, String graphId)
Description copied from interface:AuthManagerDAOUpdates the underlying GraphID property in the database. This property is known only by JDBC, and not by hibernate, because only graph-specific actions require it, and the code that requires updating this propoerty will not necesssarily have access to Hibernate or JPA.- Specified by:
updateGraphIdin interfaceAuthManagerDAO- Parameters:
type- - type of entityid- - ID in openiam databasegraphId- - ID in graph database
-
updateGraphId
public void updateGraphId(VertexType type, List<Tuple<String,String>> id2GraphIdMap)
Description copied from interface:AuthManagerDAOUpdates the underlying GraphID property in the database. This property is known only by JDBC, and not by hibernate, because only graph-specific actions require it, and the code that requires updating this propoerty will not necesssarily have access to Hibernate or JPA.- Specified by:
updateGraphIdin interfaceAuthManagerDAO- Parameters:
type- - type of entityid2GraphIdMap- - Tuple where key is openiam ID, and value is graph Database ID
-
selectGraphId
public String selectGraphId(VertexType type, String openiamid)
- Specified by:
selectGraphIdin interfaceAuthManagerDAO
-
getGraphVertexIds
public Map<VertexType,Map<String,String>> getGraphVertexIds()
- Specified by:
getGraphVertexIdsin interfaceAuthManagerDAO- Returns:
- - Returns a Map of
VertexType(User, Group, Role, etc) to the Map of OpenIAM Internal ID (key) to the graph ID (value)
-
getEdgeIds
public Map<String,String> getEdgeIds()
- Specified by:
getEdgeIdsin interfaceAuthManagerDAO
-
updateEdge
public void updateEdge(String membershipId, String rightId, String edgeId, VertexType parentType, VertexType childType)
Description copied from interface:AuthManagerDAOUpdates the EDGE_ID field in the database, based on the membership id and right id The parentType and childType VertexTypes will dictate which XREF table gets updated- Specified by:
updateEdgein interfaceAuthManagerDAO
-
updateEdges
public void updateEdges(List<RightAwareEdgeDatabaseTuple> rightAwareEdgeDatabaseTuple, VertexType parentType, VertexType childType)
Description copied from interface:AuthManagerDAOBatch updates the necessary database right xref database table The parentType and childType VertexTypes will dictate which XREF table gets updated- Specified by:
updateEdgesin interfaceAuthManagerDAO
-
updateEdgesWithoutRights
public void updateEdgesWithoutRights(List<RightAwareEdgeDatabaseTuple> edgeDatabaseTuples, VertexType parentType, VertexType childType)
Description copied from interface:AuthManagerDAOBatch updates the necessary database right xref database table The parentType and childType VertexTypes will dictate which XREF table gets updated- Specified by:
updateEdgesWithoutRightsin interfaceAuthManagerDAO
-
getExpiredEdgeIds
public Map<EdgeVertexType,Set<String>> getExpiredEdgeIds(Date now)
- Specified by:
getExpiredEdgeIdsin interfaceAuthManagerDAO
-
nullOutEdges
public void nullOutEdges(Map<EdgeVertexType,Set<String>> edgeIdentity2EdgeIdMap)
Description copied from interface:AuthManagerDAOThe name of this method is somewhat misleading. It updates the `EDGE_ID` column to `NULL`. The key ofedgeIdentity2EdgeIdMaptells us what type of edge it is Most likely, the argument into this method is the result of the call togetExpiredEdgeIds- Specified by:
nullOutEdgesin interfaceAuthManagerDAO
-
-