Groovy Documentation

services
Class DependenciesService

java.lang.Object
  services.DependenciesService

class DependenciesService

Provides a wrapper for some Dependencies related functionality.

author:
Angus Roberts


Property Summary
def yamService

The YamService

 
Constructor Summary
DependenciesService()

 
Method Summary
Set created(Wiki wiki, YamFile yam)

Update dependencies for new YAM files.

Set created(Wiki wiki, File file)

Update dependencies for new files.

Dependencies get(Wiki wiki)

Get the Dependencies for a wiki.

Set modified(Wiki wiki, YamFile yam)

Update dependencies for modified YAM files.

void regenerate(Wiki wiki)

Regenerate all Dependencies for a wiki.

void serialize(Wiki wiki)

Serialize the given wiki

void setSerializationDirectory(File f)

Set the directory to which Dependencies will be serialised

void setSerializationFilePrefix(String prefix)

Set the prefix to use for the serialized dependencies files

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Property Detail

yamService

def yamService
The YamService


 
Constructor Detail

DependenciesService

DependenciesService()


 
Method Detail

created

Set created(Wiki wiki, YamFile yam)
Update dependencies for new YAM files.
return:
A set of YAMs now needing regeneration.


created

Set created(Wiki wiki, File file)
Update dependencies for new files.
return:
A set of YAMs now needing regeneration.


get

Dependencies get(Wiki wiki)
Get the Dependencies for a wiki. Unlike the Dependencies.get method, this method will first check to see if a Dependencies already exists, and if not, it will regenerate all Dependencies for the wiki. This deals with serialized Dependencies that have been deleted on disk.


modified

Set modified(Wiki wiki, YamFile yam)
Update dependencies for modified YAM files.
return:
A set of YAMs now needing regeneration.


regenerate

void regenerate(Wiki wiki)

Regenerate all Dependencies for a wiki. All existing link and include dependencies for the parameter wiki will be discarded, and new link and include dependencies created for every yam file in the wiki. This method exists because it is inevitable that the recorded link and include dependencies will sometimes get out of synch with the reality of links and includes in the yam files. For example, if someone edits a yam file on disk rather than through the wiki interface. Or, if someone changes the wiki sandbox. Being out of synch will not cause serious problems, but it needs to be periodically resolved, e.g. through an interface option to regenerate, or through a job run at a regular interval.

param:
wikiID The ID of the wiki for which the Dependencies will be regenerated


serialize

void serialize(Wiki wiki)
Serialize the given wiki


setSerializationDirectory

void setSerializationDirectory(File f)
Set the directory to which Dependencies will be serialised


setSerializationFilePrefix

void setSerializationFilePrefix(String prefix)
Set the prefix to use for the serialized dependencies files


 

Groovy Documentation