Fehlenden Konstruktor GenericOrgaUnitText(String) im GenericOrgaUnitTextAsset ergänzt. Durch den fehlenden Konstruktor konnten Items mit einem solchen Asset nicht publiziert werden.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2378 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
5c9584f4a1
commit
5d27d71202
|
|
@ -60,7 +60,6 @@ public class GenericOrgaUnitTextAsset extends ACSObject {
|
||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public static final String TEXT_ASSET_NAME = "textAssetName";
|
public static final String TEXT_ASSET_NAME = "textAssetName";
|
||||||
public static final String CONTENT = "content";
|
public static final String CONTENT = "content";
|
||||||
public static final String ORGAUNIT = "orgaunit";
|
public static final String ORGAUNIT = "orgaunit";
|
||||||
|
|
@ -74,6 +73,10 @@ public class GenericOrgaUnitTextAsset extends ACSObject {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GenericOrgaUnitTextAsset(final String type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
public GenericOrgaUnitTextAsset(final DataObject dataObject) {
|
public GenericOrgaUnitTextAsset(final DataObject dataObject) {
|
||||||
super(dataObject);
|
super(dataObject);
|
||||||
}
|
}
|
||||||
|
|
@ -90,40 +93,37 @@ public class GenericOrgaUnitTextAsset extends ACSObject {
|
||||||
// @Override
|
// @Override
|
||||||
// protected void initialize() {
|
// protected void initialize() {
|
||||||
// super.initialize();
|
// super.initialize();
|
||||||
|
|
||||||
// final DataObject dataObject = (DataObject) get(AUDIT);
|
// final DataObject dataObject = (DataObject) get(AUDIT);
|
||||||
// if (dataObject == null) {
|
// if (dataObject == null) {
|
||||||
// auditTrail = BasicAuditTrail.retrieveForACSObject(this);
|
// auditTrail = BasicAuditTrail.retrieveForACSObject(this);
|
||||||
// } else {
|
// } else {
|
||||||
// auditTrail = new BasicAuditTrail(dataObject);
|
// auditTrail = new BasicAuditTrail(dataObject);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// addObserver(new AuditingObserver(auditTrail));
|
// addObserver(new AuditingObserver(auditTrail));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public String getTextAssetName() {
|
public String getTextAssetName() {
|
||||||
return (String) get(TEXT_ASSET_NAME);
|
return (String) get(TEXT_ASSET_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTextAssetName(final String textAssetName) {
|
public void setTextAssetName(final String textAssetName) {
|
||||||
set(TEXT_ASSET_NAME, textAssetName);
|
set(TEXT_ASSET_NAME, textAssetName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getContent() {
|
public String getContent() {
|
||||||
return (String) get(CONTENT);
|
return (String) get(CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContent(final String content) {
|
public void setContent(final String content) {
|
||||||
set(CONTENT, content);
|
set(CONTENT, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericOrganizationalUnit getOwner() {
|
public GenericOrganizationalUnit getOwner() {
|
||||||
final DataObject dataObject = (DataObject) get(ORGAUNIT);
|
final DataObject dataObject = (DataObject) get(ORGAUNIT);
|
||||||
Assert.exists(dataObject, DataObject.class);
|
Assert.exists(dataObject, DataObject.class);
|
||||||
|
|
||||||
return (GenericOrganizationalUnit) DomainObjectFactory.newInstance(dataObject);
|
return (GenericOrganizationalUnit) DomainObjectFactory.newInstance(dataObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public User getTextAssetAuthor() {
|
// public User getTextAssetAuthor() {
|
||||||
// return auditTrail.getCreationUser();
|
// return auditTrail.getCreationUser();
|
||||||
// }
|
// }
|
||||||
|
|
@ -131,16 +131,16 @@ public class GenericOrgaUnitTextAsset extends ACSObject {
|
||||||
// public Date getCreationDate() {
|
// public Date getCreationDate() {
|
||||||
// return auditTrail.getCreationDate();
|
// return auditTrail.getCreationDate();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public static DataCollection getTextAssets(final GenericOrganizationalUnit orgaunit) {
|
public static DataCollection getTextAssets(final GenericOrganizationalUnit orgaunit) {
|
||||||
Assert.exists(orgaunit, GenericOrganizationalUnit.class);
|
Assert.exists(orgaunit, GenericOrganizationalUnit.class);
|
||||||
|
|
||||||
final DataCollection textAssets = SessionManager.getSession().retrieve(BASE_DATA_OBJECT_TYPE);
|
final DataCollection textAssets = SessionManager.getSession().
|
||||||
|
retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
textAssets.addEqualsFilter(ORGAUNIT, orgaunit.getID());
|
textAssets.addEqualsFilter(ORGAUNIT, orgaunit.getID());
|
||||||
|
|
||||||
return textAssets;
|
return textAssets;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// protected void beforeSave() {
|
// protected void beforeSave() {
|
||||||
// super.beforeSave();
|
// super.beforeSave();
|
||||||
|
|
@ -159,5 +159,4 @@ public class GenericOrgaUnitTextAsset extends ACSObject {
|
||||||
// isNew = false;
|
// isNew = false;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue