PublishedLink
Korrektur der Methode zum Speichern von LinkAttributen git-svn-id: https://svn.libreccm.org/ccm/trunk@872 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c5b1c11bf9
commit
f1bbba529f
|
|
@ -151,7 +151,16 @@ class PublishedLink extends DomainObject {
|
|||
}
|
||||
|
||||
if ((sourceObject != null) && sourceObject.getObjectType().getProperty(propertyName).isCollection()) {
|
||||
link.saveLinkAttributes((DataCollection) sourceObject.get(propertyName + "@link"));
|
||||
|
||||
DataCollection coll = (DataCollection) sourceObject.get(propertyName + "@link");
|
||||
while (coll.next()) {
|
||||
|
||||
DataObject linkObj = coll.getDataObject();
|
||||
if (linkTarget.getID() == link.getLinkTarget().getID()) {
|
||||
link.saveLinkAttributes(linkObj);
|
||||
coll.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return link;
|
||||
|
|
@ -317,11 +326,7 @@ class PublishedLink extends DomainObject {
|
|||
}
|
||||
}
|
||||
|
||||
private void saveLinkAttributes(DataCollection coll) {
|
||||
|
||||
if (coll.next()) {
|
||||
|
||||
DataObject linkObj = coll.getDataObject();
|
||||
private void saveLinkAttributes(DataObject linkObj) {
|
||||
|
||||
Iterator properties = linkObj.getObjectType().getDeclaredProperties();
|
||||
HashMap<String, Object> linkAttributes = new HashMap();
|
||||
|
|
@ -348,10 +353,6 @@ class PublishedLink extends DomainObject {
|
|||
}
|
||||
|
||||
set(LINK_ATTRIBUTES, data.toByteArray());
|
||||
|
||||
}
|
||||
|
||||
coll.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue