public class WeakLinkManager extends BasicStoreListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Publication> |
extractPubSetFromImg(java.lang.String text)
Returns the set of publication referenced through <img> tag in the given text.
|
java.util.Set<Publication> |
extractPubSetFromWysiwyg(java.lang.String text) |
java.util.Set<Publication> |
extractWeakLinkSet(Publication pub)
Returns the set of publication weakly referenced by the given publication.
|
static WeakLinkManager |
getInstance() |
java.util.Map<java.lang.String,java.util.Set<Publication>> |
getUrlMap()
Returns the map of urls referenced by publications.
|
java.util.Map<java.lang.String,java.util.Set<Publication>> |
getUrlMap(Workspace ws,
Member mbr)
Returns the map of urls referenced by publications of the given workspace.
|
java.util.Set<Publication> |
getUrlReferrerSet(java.lang.String url)
Returns all the publications referring the given URL.
|
void |
handleCommitUpdate(Storable storable,
Storable oldStorable,
boolean firstTime)
This method gets called when after a storable has been updated.
|
void |
handleCreate(Storable storable,
boolean firstTime)
This method gets called when a storable is created.
|
void |
handleDelete(Storable storable,
boolean firstTime)
This method gets called when a storable is deleted.
|
void |
indexPublication(Publication referrer)
Indexes the given publication.
|
void |
init()
Scans and indexes all existing publications then register a StoreListener (myself) to update the index at each change.
|
void |
reindexPublication(Publication referrer)
Reindexes the given publication.
|
void |
unindexPublication(Publication referrer)
Unindexes the given publication.
|
handlePrepareUpdate, init
public static final java.lang.String REVISION
public static WeakLinkManager getInstance()
public void init()
public void indexPublication(Publication referrer)
referrer
- the publication to be indexed.public void unindexPublication(Publication referrer)
referrer
- the publication to be unindexed.public void reindexPublication(Publication referrer)
referrer
- the publication to be reindexed.public java.util.Set<Publication> getUrlReferrerSet(java.lang.String url)
url
- the referee URLpublic java.util.Map<java.lang.String,java.util.Set<Publication>> getUrlMap()
public java.util.Map<java.lang.String,java.util.Set<Publication>> getUrlMap(Workspace ws, Member mbr)
ws
- the workspacembr
- the member used for filteringpublic java.util.Set<Publication> extractWeakLinkSet(Publication pub)
pub
- the publicationpublic void handleCreate(Storable storable, boolean firstTime)
StoreListener
handleCreate
in interface StoreListener
handleCreate
in class BasicStoreListener
storable
- the storablefirstTime
- true if it is the first time this operation is processedStoreListener.handleCreate(Storable, boolean)
public void handleCommitUpdate(Storable storable, Storable oldStorable, boolean firstTime)
StoreListener
handleCommitUpdate
in interface StoreListener
handleCommitUpdate
in class BasicStoreListener
storable
- the storable, this instance is the object that was created
at first and that will be stored in jcms until deletion of the storable
with this ID.
You should always manipulate this object if you maintain any index.oldStorable
- the previous version of the storable, it is a clone, do not use
in any index, it should only be used to access old values.firstTime
- true if it is the first time this operation is processedStoreListener.handleCommitUpdate(Storable, Storable, boolean)
public void handleDelete(Storable storable, boolean firstTime)
StoreListener
handleDelete
in interface StoreListener
handleDelete
in class BasicStoreListener
storable
- the storablefirstTime
- true if it is the first time this operation is processedStoreListener.handleDelete(Storable, boolean)
public java.util.Set<Publication> extractPubSetFromWysiwyg(java.lang.String text)
public java.util.Set<Publication> extractPubSetFromImg(java.lang.String text)
text
- the textCopyright © 2001-2010 Jalios SA. All Rights Reserved.