|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
org.gcube.vremanagement.resourcemanager.impl.state.ScopeState
public final class ScopeState
A list of scoped resources
| Nested Class Summary | |
|---|---|
static class |
ScopeState.OPERATION
|
| Field Summary | |
|---|---|
protected ScopeState.OPERATION |
lastOperationPerformed
last operation performed on the list |
protected org.gcube.common.core.utils.logging.GCUBELog |
logger
|
| Constructor Summary | |
|---|---|
protected |
ScopeState()
|
| Method Summary | |
|---|---|
void |
addResources(Set<ScopedResource> newresources)
Adds a new resources to the list |
void |
changeDescription(String description)
Changes the scope description |
boolean |
containsResource(String id)
|
void |
forceResourceRemoval(Set<ScopedResource> resources)
Removes the resource from the state, no matter about its actual status |
Collection<ScopedResource> |
getAllResources()
Gets all the ScopedResources |
String |
getDescription()
|
String |
getDesigner()
Gets the scope designer |
Date |
getEndTime()
|
ScopeState.OPERATION |
getLastOperationPerformed()
|
Session |
getLastReport()
Gets the last active Session |
String |
getManager()
Gets the scope manager |
String |
getName()
|
VirtualNode |
getNode(String name)
Gets the node by its name |
VirtualNode |
getNodeById(String id)
Gets the node by its identifier |
RawScopeState |
getRawScopeState()
Gets the RawScopeState |
ScopedDeployedSoftware |
getRelatedDeployedSoftware(GCUBEPackage sourceService)
Gets the deployed service of the given service, if any |
ScopedResource |
getResource(String id)
Gets the resource with the given id |
Set<ScopedResource> |
getResourcesByType(String type)
Gets resources of the given type |
org.gcube.common.core.scope.GCUBEScope |
getScope()
Gets the resource's scope |
Date |
getStartTime()
|
protected void |
initialize(org.gcube.common.core.scope.GCUBEScope scope,
String name,
boolean securityEnabled,
String... description)
|
boolean |
isDisposed()
|
boolean |
isSecurityEnabled()
|
void |
markAsDisposed()
|
void |
notifyObservers()
|
void |
notifyObservers(Object whatschanged)
|
protected void |
removeAllResources()
Empty the list of resources |
void |
removeAllResourcesByType(String type)
Removes all the resource of the given type |
void |
removeResources(Set<ScopedResource> oldresources)
Removes the resources from the scope |
void |
setDesigner(String designer)
Sets the scope designer identity |
void |
setEndTime(Date endTime)
|
void |
setLastOperationPerformed(ScopeState.OPERATION operation)
|
void |
setLastSession(Session report)
Sets the last active Session |
void |
setManager(String manager)
Sets the scope manager identity |
void |
setName(String name)
|
void |
setRawScopeState(RawScopeState state)
Sets the new RawScopeState
it usually invoked at deserialization time, see Serializer.load(ScopeState, GCUBEScope) |
void |
setSecurity(boolean securityEnabled)
|
void |
setStartTime(Date startTime)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.gcube.common.core.utils.logging.GCUBELog logger
protected ScopeState.OPERATION lastOperationPerformed
| Constructor Detail |
|---|
protected ScopeState()
| Method Detail |
|---|
protected void initialize(org.gcube.common.core.scope.GCUBEScope scope,
String name,
boolean securityEnabled,
String... description)
public void setManager(String manager)
manager - the managerpublic void setDesigner(String designer)
manager - the managerpublic void changeDescription(String description)
description - the descriptionpublic void addResources(Set<ScopedResource> newresources)
newresources - the resources to addpublic Set<ScopedResource> getResourcesByType(String type)
type - the type to filter
public ScopedResource getResource(String id)
id - the resource identified
public boolean containsResource(String id)
public void removeAllResourcesByType(String type)
type - the type of resources to remove
public void removeResources(Set<ScopedResource> oldresources)
throws VirtualNode.NoGHNFoundException
oldresources - the resources to remove
VirtualNode.NoGHNFoundExceptionpublic void forceResourceRemoval(Set<ScopedResource> resources)
resources - protected void removeAllResources()
public org.gcube.common.core.scope.GCUBEScope getScope()
public void notifyObservers(Object whatschanged)
notifyObservers in class Observablepublic void notifyObservers()
notifyObservers in class Observablepublic Collection<ScopedResource> getAllResources()
ScopedResources
ScopedResourcespublic String getManager()
public String getDesigner()
public String getDescription()
public String getName()
public Date getEndTime()
public Date getStartTime()
public boolean isSecurityEnabled()
public void setEndTime(Date endTime)
public void setStartTime(Date startTime)
public void setName(String name)
public ScopeState.OPERATION getLastOperationPerformed()
public void setLastOperationPerformed(ScopeState.OPERATION operation)
operation - the last operation performed on the listpublic RawScopeState getRawScopeState()
RawScopeState
public void setRawScopeState(RawScopeState state)
RawScopeState
it usually invoked at deserialization time, see Serializer.load(ScopeState, GCUBEScope)
state - public void setSecurity(boolean securityEnabled)
public Session getLastReport()
Session
public void setLastSession(Session report)
Session
session - the sessionpublic boolean isDisposed()
public void markAsDisposed()
isDisposed - the isDisposed to set
public VirtualNode getNode(String name)
throws VirtualNode.NoGHNFoundException
name - the name
VirtualNode.NoGHNFoundException - if the node does not exist
public VirtualNode getNodeById(String id)
throws VirtualNode.NoGHNFoundException
id - the identifier
VirtualNode.NoGHNFoundException - if the node does not exist
public ScopedDeployedSoftware getRelatedDeployedSoftware(GCUBEPackage sourceService)
throws ServiceNotFoundException
scopeState - the state where to search the deployed servicesourceService - the service
ServiceNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||