Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java @ 159:db0d20440b92
Added code to create collections.
artifacts/trunk@1384 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 03 Mar 2011 12:13:24 +0000 |
parents | d718a4d55662 |
children | dc687827439f |
comparison
equal
deleted
inserted
replaced
158:d718a4d55662 | 159:db0d20440b92 |
---|---|
1101 | 1101 |
1102 if (acf == null) { | 1102 if (acf == null) { |
1103 throw new ArtifactDatabaseException(NO_SUCH_FACTORY); | 1103 throw new ArtifactDatabaseException(NO_SUCH_FACTORY); |
1104 } | 1104 } |
1105 | 1105 |
1106 // FIXME: fetch name from incoming document | |
1107 String name = "Collection-" + new java.util.Date(); | |
1108 | |
1106 ArtifactCollection ac = backend.createCollection( | 1109 ArtifactCollection ac = backend.createCollection( |
1107 ownerId, data, context, acf); | 1110 ownerId, name, acf, data, context); |
1108 | 1111 |
1109 if (ac == null) { | 1112 if (ac == null) { |
1110 throw new ArtifactDatabaseException(COLLECTION_CREATION_FAILED); | 1113 throw new ArtifactDatabaseException(COLLECTION_CREATION_FAILED); |
1111 } | 1114 } |
1112 | 1115 |