Class TrsFeedController
- java.lang.Object
-
- com.sodius.oslc.server.trs.services.TrsFeedController
-
public class TrsFeedController extends Object
Provides operations on a TRS feed.- Since:
- 3.3.0
-
-
Constructor Summary
Constructors Constructor Description TrsFeedController(TrsFeed feed, TrsStoreSynchronizer storeSynchronizer, TrackedResourceCollector trackedResourceCollector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TrsFeed
getFeed()
Gets the controlledTrsFeed
.ResourceEventStore
getResourceEventStore()
Gets the TRS feedResourceEventStore
.TrsFeedStatistics
getStatistics(Optional<String> trsFunctionalUserIdentifier)
Computes statistics for the TRS feed.protected TrsStoreSynchronizer
getStoreSynchronizer()
Gets the TRS feedTrsStoreSynchronizer
.protected TrackedResourceCollector
getTrackedResourceCollector()
Gets the TRS feedTrackedResourceCollector
boolean
isResourceExposed(ResourceSeed resourceSeed)
Determines whether or not a TRS feed exposes a resource.void
rebuild()
Rebuilds the TRS feed.void
repair()
Repairs the TRS feed.
-
-
-
Constructor Detail
-
TrsFeedController
public TrsFeedController(TrsFeed feed, TrsStoreSynchronizer storeSynchronizer, TrackedResourceCollector trackedResourceCollector)
-
-
Method Detail
-
getStoreSynchronizer
protected TrsStoreSynchronizer getStoreSynchronizer()
Gets the TRS feedTrsStoreSynchronizer
.- Returns:
- the TRS feed
TrsStoreSynchronizer
.
-
getTrackedResourceCollector
protected TrackedResourceCollector getTrackedResourceCollector()
Gets the TRS feedTrackedResourceCollector
- Returns:
- the TRS feed
TrackedResourceCollector
-
getResourceEventStore
public ResourceEventStore getResourceEventStore()
Gets the TRS feedResourceEventStore
.- Returns:
- the TRS feed
ResourceEventStore
.
-
isResourceExposed
public boolean isResourceExposed(ResourceSeed resourceSeed) throws TrsStoreException
Determines whether or not a TRS feed exposes a resource.- Parameters:
resourceSeed
- the resourceSeed to search for.- Returns:
- whether or not the resource is exposed by the TRS feed.
- Throws:
TrsStoreException
- if the resource exposition status can't be computed.
-
rebuild
public void rebuild() throws MissingTrsFunctionalUserException, UnresolvedTrsFunctionalUserException, TrsFunctionalUserStoreException, TrsStoreException, ProjectAreaStoreException
Rebuilds the TRS feed.- Throws:
MissingTrsFunctionalUserException
- if the TRS functional user is not set.UnresolvedTrsFunctionalUserException
- if the TRS functional user can't be resolved.TrsFunctionalUserStoreException
- if an error prevents getting the TRS functional user.TrsStoreException
- if an error prevents the rebuild.ProjectAreaStoreException
- if an error resolve the TRS exposed project areas.
-
repair
public void repair() throws MissingTrsFunctionalUserException, UnresolvedTrsFunctionalUserException, TrsFunctionalUserStoreException, TrsStoreException, ProjectAreaStoreException
Repairs the TRS feed.- Throws:
MissingTrsFunctionalUserException
- if the TRS functional user is not set.UnresolvedTrsFunctionalUserException
- if the TRS functional user can't be resolved.TrsFunctionalUserStoreException
- if an error prevents getting the TRS functional user.TrsStoreException
- if an error prevents the repair.ProjectAreaStoreException
- if an error resolve the TRS exposed project areas.- Since:
- 3.7.0
-
getStatistics
public TrsFeedStatistics getStatistics(Optional<String> trsFunctionalUserIdentifier) throws TrsStoreException
Computes statistics for the TRS feed.- Parameters:
trsFunctionalUserIdentifier
- optionally, the TRS functional user identifier.- Returns:
- statistics about the TRS feed.
- Throws:
TrsStoreException
- if an error prevents the statistics computing.
-
-