{
Iterator<ProfileDeployment> iter = apps.iterator();
while (iter.hasNext())
{
ProfileDeployment ctx = iter.next();
VirtualFile root = ctx.getRoot();
String pathName = ctx.getName();
// Ignore locked or disabled applications
if (this.hasDeploymentContentFlags(pathName, ignoreFlags))
{
if (trace)
log.trace("Ignoring locked application: " + root);
continue;
}
// Check for removal
if (root.exists() == false)
{
long rootLastModified = root.getLastModified();
ModificationInfo info = new ModificationInfo(ctx, rootLastModified, ModifyStatus.REMOVED);
modifications.put(pathName, info);
iter.remove();
// Remove last modified cache
cleanUpRoot(root);
cleanupDeployment(pathName);
if (trace)
log.trace(pathName + " was removed");
}
// Check for modification
else if (hasDeploymentContentFlags(pathName, DeploymentContentFlags.MODIFIED)
|| getChecker().hasStructureBeenModified(pathName, root))
{
long rootLastModified = root.getLastModified();
if (trace)
log.trace(pathName + " was modified: " + rootLastModified);
// Create the modification info
ModificationInfo info = new ModificationInfo(ctx, rootLastModified, ModifyStatus.MODIFIED);
modifications.put(pathName, info);