Revision 6775
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
792 | 792 |
updateUserOwner(dbConn, docid, user, updated); |
793 | 793 |
DBConnectionPool.returnDBConnection(dbConn, serialNumber); |
794 | 794 |
|
795 |
// process system metadata |
|
796 |
if (systemMetadataXML != null) { |
|
797 |
SystemMetadata sysMeta = |
|
798 |
TypeMarshaller.unmarshalTypeFromStream( |
|
799 |
SystemMetadata.class, |
|
800 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
|
801 |
// need the guid-to-docid mapping |
|
802 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), docid); |
|
803 |
// save the system metadata |
|
804 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
805 |
} |
|
806 |
|
|
807 |
// process the access control |
|
795 | 808 |
Vector<XMLAccessDAO> accessControlList = dih.getAccessControlList(); |
796 | 809 |
if (accessControlList != null) { |
797 | 810 |
AccessControlForSingleFile acfsf = new AccessControlForSingleFile(docid); |
... | ... | |
803 | 816 |
} |
804 | 817 |
} |
805 | 818 |
} |
806 |
|
|
807 |
// process system metadata |
|
808 |
if (systemMetadataXML != null) { |
|
809 |
SystemMetadata sysMeta = |
|
810 |
TypeMarshaller.unmarshalTypeFromStream( |
|
811 |
SystemMetadata.class, |
|
812 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
|
813 |
// need the guid-to-docid mapping |
|
814 |
IdentifierManager.getInstance().createMapping(sysMeta.getIdentifier().getValue(), docid); |
|
815 |
// save the system metadata |
|
816 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
|
817 |
} |
|
818 | 819 |
|
819 | 820 |
if (writeException != null) { |
820 | 821 |
throw writeException; |
Also available in: Unified diff
process system metadata before access rules (access control is now driven by GUID so the mapping needs to be there)