[jboss-cvs] JBossAS SVN: r81213 - trunk/system/src/main/org/jboss/system/server/profileservice/repository.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Nov 18 04:47:23 EST 2008
Author: emuckenhuber
Date: 2008-11-18 04:47:23 -0500 (Tue, 18 Nov 2008)
New Revision: 81213
Modified:
trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/JAXBAttachmentSerializer.java
Log:
use a .xml suffix for xml attachments.
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2008-11-18 05:36:16 UTC (rev 81212)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2008-11-18 09:47:23 UTC (rev 81213)
@@ -38,6 +38,10 @@
implements AttachmentsSerializer
{
private static final Logger log = Logger.getLogger(AbstractFileAttachmentsSerializer.class);
+
+ /** The attachment suffix */
+ private static final String ATTACHMENT_SUFFIX = ".attachment";
+
/** The deployment pre-processed attachments store dir */
private File attachmentsStoreDir;
@@ -98,8 +102,7 @@
protected File getAttachmentPath(String baseName)
{
- String vfsPath = baseName;
- vfsPath += ".attachment";
+ final String vfsPath = baseName + ATTACHMENT_SUFFIX;
return new File(attachmentsStoreDir, vfsPath);
}
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/JAXBAttachmentSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/JAXBAttachmentSerializer.java 2008-11-18 05:36:16 UTC (rev 81212)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/JAXBAttachmentSerializer.java 2008-11-18 09:47:23 UTC (rev 81213)
@@ -41,6 +41,9 @@
/** The logger */
private static final Logger log = Logger.getLogger(JAXBAttachmentSerializer.class);
+ /** The attachment suffix. */
+ private static final String ATTACHMENT_SUFFIX = ".attachment.xml";
+
@SuppressWarnings("unchecked")
protected <T> T loadAttachment(File attachmentsStore, Class<T> expected) throws Exception
{
@@ -56,6 +59,14 @@
Marshaller marshaller = ctx.createMarshaller();
marshaller.setProperty("jaxb.formatted.output", Boolean.TRUE);
marshaller.marshal(attachment, attachmentsStore);
- }
+ }
+
+ @Override
+ protected File getAttachmentPath(String baseName)
+ {
+ final String vfsPath = baseName + ATTACHMENT_SUFFIX;
+ return new File(getAttachmentsStoreDir(), vfsPath);
+ }
+
}
More information about the jboss-cvs-commits
mailing list