org.apache.sling.installer.core.impl
Class EntityResourceList

java.lang.Object
  extended by org.apache.sling.installer.core.impl.EntityResourceList
All Implemented Interfaces:
Serializable, TaskResourceGroup

public class EntityResourceList
extends Object
implements Serializable, TaskResourceGroup

Persistent list of RegisteredResource, used by installer to keep track of all registered resources

See Also:
Serialized Form

Constructor Summary
EntityResourceList()
           
 
Method Summary
 void addOrUpdate(TaskResource r)
           
 boolean compact()
          Compact the resource group by removing uninstalled entries
 TaskResource getActiveResource()
          Return the first resource if it either needs to be installed or uninstalled.
 Collection<TaskResource> getResources()
           
 boolean isEmpty()
          The resource list is empty if it contains no resources.
 void remove(String url)
           
 void remove(TaskResource r)
           
 void setFinishState(ResourceState state)
          Set the finish state for the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityResourceList

public EntityResourceList()
Method Detail

isEmpty

public boolean isEmpty()
The resource list is empty if it contains no resources.


getActiveResource

public TaskResource getActiveResource()
Return the first resource if it either needs to be installed or uninstalled.

Specified by:
getActiveResource in interface TaskResourceGroup

setFinishState

public void setFinishState(ResourceState state)
Set the finish state for the resource. If this resource has been uninstalled, check the next in the list if it needs to be reactivated.

Specified by:
setFinishState in interface TaskResourceGroup

getResources

public Collection<TaskResource> getResources()

addOrUpdate

public void addOrUpdate(TaskResource r)

remove

public void remove(String url)

remove

public void remove(TaskResource r)

compact

public boolean compact()
Compact the resource group by removing uninstalled entries



Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.