aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-plugin/src/main/java/org/openecomp/core/zusammen/plugin/dao/ElementStageRepository.java
blob: ac3dc4e4bffb2105664cde18a0297c537570f4d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.openecomp.core.zusammen.plugin.dao;

import com.amdocs.zusammen.datatypes.SessionContext;
import com.amdocs.zusammen.datatypes.item.Action;
import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
import org.openecomp.core.zusammen.plugin.dao.types.ElementEntity;
import org.openecomp.core.zusammen.plugin.dao.types.StageEntity;

import java.util.Collection;
import java.util.Optional;

public interface ElementStageRepository
    extends StageRepository<ElementEntityContext, ElementEntity> {

  Optional<StageEntity<ElementEntity>> getDescriptor(SessionContext context,
                                                     ElementEntityContext elementContext,
                                                     ElementEntity element);

  Collection<ElementEntity> listIds(SessionContext context,
                                    ElementEntityContext elementContext);

  Collection<ElementEntity> listConflictedIds(SessionContext context,
                                              ElementEntityContext elementContext);

  void markAsNotConflicted(SessionContext context, ElementEntityContext entityContext,
                           ElementEntity entity, Action action);

  void markAsNotConflicted(SessionContext context, ElementEntityContext entityContext,
                           ElementEntity entity);

  void update(SessionContext context, ElementEntityContext entityContext, ElementEntity entity,
              Action action, boolean conflicted);

}