public class EntityResourceList extends Object implements Serializable, TaskResourceGroup
Constructor and Description |
---|
EntityResourceList(String resourceId,
InstallationListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
addOrUpdate(RegisteredResourceImpl 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.
|
String |
getAlias()
Get the alias for this group or null
|
TaskResource |
getFirstResource()
Return the first resource or null
|
String |
getFullAlias()
Get the alias for this group or null
|
TaskResource |
getNextActiveResource()
If there is more than the active resource in the group, return the second
resource from the group.
|
String |
getResourceId()
Get the resource id.
|
Collection<RegisteredResourceImpl> |
getResources() |
boolean |
isEmpty()
The resource list is empty if it contains no resources.
|
void |
remove(String url) |
void |
setFinishState(ResourceState state)
Set the finish state for the active resource.
|
void |
setFinishState(ResourceState state,
String alias)
Set the finish state for the active resource and register an alias.
|
void |
setListener(InstallationListener listener)
Set the listener
|
void |
setResourceId(String id)
Set the resource id
|
public EntityResourceList(String resourceId, InstallationListener listener)
public boolean isEmpty()
public TaskResource getActiveResource()
TaskResourceGroup
getActiveResource
in interface TaskResourceGroup
TaskResourceGroup.getActiveResource()
public TaskResource getNextActiveResource()
TaskResourceGroup
getNextActiveResource
in interface TaskResourceGroup
TaskResourceGroup.getNextActiveResource()
public TaskResource getFirstResource()
public String getAlias()
getAlias
in interface TaskResourceGroup
null
public String getFullAlias()
public String getResourceId()
public void setResourceId(String id)
public void setListener(InstallationListener listener)
public void setFinishState(ResourceState state)
TaskResourceGroup
setFinishState
in interface TaskResourceGroup
TaskResourceGroup.setFinishState(org.apache.sling.installer.api.tasks.ResourceState)
public void setFinishState(ResourceState state, String alias)
TaskResourceGroup
TaskResourceGroup.setFinishState(ResourceState)
but in addition registers an alias id for the resource.setFinishState
in interface TaskResourceGroup
TaskResourceGroup.setFinishState(org.apache.sling.installer.api.tasks.ResourceState, java.lang.String)
public Collection<RegisteredResourceImpl> getResources()
public void addOrUpdate(RegisteredResourceImpl r)
public void remove(String url)
public boolean compact()
true
if another cycle should be started.Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.