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

java.lang.Object
  extended by org.apache.sling.installer.core.impl.PersistentResourceList

public class PersistentResourceList
extends Object

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


Constructor Summary
PersistentResourceList(File dataFile)
           
 
Method Summary
 void addOrUpdate(InternalResource input)
          Add or update an installable resource.
 boolean compact()
          Compact the internal state and remove empty groups.
 Collection<String> getEntityIds()
           
 EntityResourceList getEntityResourceList(String entityId)
          Get the resource group for an entity id.
 List<RegisteredResource> getUntransformedResources()
          Get the list of untransformed resources = resources without resource type
 void remove(String url)
          Remove a resource by url.
 void remove(TaskResource r)
          Remove a resource.
 void save()
          Persist the current state
 void transform(RegisteredResource resource, TransformationResult[] result)
          Transform an unknown resource to a registered one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentResourceList

public PersistentResourceList(File dataFile)
Method Detail

save

public void save()
Persist the current state


getEntityIds

public Collection<String> getEntityIds()

addOrUpdate

public void addOrUpdate(InternalResource input)
Add or update an installable resource.

Parameters:
input - The installable resource

getUntransformedResources

public List<RegisteredResource> getUntransformedResources()
Get the list of untransformed resources = resources without resource type


remove

public void remove(String url)
Remove a resource by url. Check all resource groups and the list of untransformed resources.

Parameters:
url - The url to remove

remove

public void remove(TaskResource r)
Remove a resource.


getEntityResourceList

public EntityResourceList getEntityResourceList(String entityId)
Get the resource group for an entity id.


compact

public boolean compact()
Compact the internal state and remove empty groups.


transform

public void transform(RegisteredResource resource,
                      TransformationResult[] result)
Transform an unknown resource to a registered one



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