|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.Model
net.sf.borg.model.LinkModel
public class LinkModel
LinkModel manages the Link Entities, which are associations between BORG Entities and other BORG Entities, files, and URLs.
Nested Class Summary | |
---|---|
static class |
LinkModel.LinkType
LinkType holds the various link types. |
Nested classes/interfaces inherited from class net.sf.borg.model.Model |
---|
Model.Listener |
Method Summary | |
---|---|
void |
addLink(KeyedEntity<?> owner,
String pathIn,
LinkModel.LinkType linkType)
Adds a link. |
static String |
attachmentFolder()
get the folder where attachments are stored |
void |
delete(int key)
Delete a link |
void |
delete(Link l)
Delete a link |
void |
deleteLinksFromEntity(KeyedEntity<?> owner)
Delete links for an owning entity |
void |
deleteLinksToEntity(KeyedEntity<?> target)
Delete links that target a given entity |
void |
export(Writer fw)
Export links to XML |
EntityDB<Link> |
getDB()
Gets the dB. |
Link |
getLink(int key)
Gets a link. |
Collection<Link> |
getLinks()
Gets all links. |
Collection<Link> |
getLinks(KeyedEntity<?> ownerbean)
Gets the links for an owning entity |
static LinkModel |
getReference()
Gets the singleton. |
void |
importXml(String fileName)
Import xml. |
void |
moveLinks(KeyedEntity<?> oldOwner,
KeyedEntity<?> newOwner)
Move links from one object to another |
Link |
newLink()
return a new link object |
void |
refresh()
Refresh listeners |
void |
saveLink(Link link)
Save a link. |
Methods inherited from class net.sf.borg.model.Model |
---|
addListener, refreshListeners, remove, removeListener, removeListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String attachmentFolder()
public static LinkModel getReference()
public void addLink(KeyedEntity<?> owner, String pathIn, LinkModel.LinkType linkType) throws Exception
owner
- the owning EntitypathIn
- the path (url, filepath, or entity key)linkType
- the link type
Exception
- the exceptionpublic void delete(int key) throws Exception
key
- the key
Exception
- the exceptionpublic void delete(Link l) throws Exception
l
- the Link
Exception
- the exceptionpublic void deleteLinksFromEntity(KeyedEntity<?> owner) throws Exception
owner
- the owning entity object
Exception
- the exceptionpublic void deleteLinksToEntity(KeyedEntity<?> target) throws Exception
target
- the target entity object
Exception
- the exceptionpublic void export(Writer fw) throws Exception
fw
- the writer to write XML to
Exception
- the exceptionpublic EntityDB<Link> getDB()
public Link getLink(int key) throws Exception
key
- the key
Exception
- the exceptionpublic Collection<Link> getLinks() throws Exception
Exception
- the exceptionpublic Collection<Link> getLinks(KeyedEntity<?> ownerbean) throws Exception
ownerbean
- the owning entity
Exception
- the exceptionpublic void importXml(String fileName) throws Exception
fileName
- the file name of the file containing the XML
Exception
- the exceptionpublic void moveLinks(KeyedEntity<?> oldOwner, KeyedEntity<?> newOwner) throws Exception
oldOwner
- the old ownernewOwner
- the new owner
Exception
- the exceptionpublic Link newLink()
public void refresh()
public void saveLink(Link link) throws Exception
link
- the link
Exception
- the exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |