DigitalAsset da = getPortletRegistry();
if (da == null) {
LOG.info("Creating new " + PORTLET_REGISTRY_CONTENT_NAME);
String filePath = CmsPropertyHandler.getDigitalAssetPath();
DigitalAssetVO newAsset = new DigitalAssetVO();
newAsset.setAssetContentType("text/xml");
newAsset.setAssetKey(PORTLET_REGISTRY_CONTENT_NAME);
newAsset.setAssetFileName(PORTLET_REGISTRY_CONTENT_NAME);
newAsset.setAssetFilePath(filePath);
newAsset.setAssetFileSize(new Integer(serial.length));
da = PortletAssetController.create(newAsset, is);
LOG.warn(PORTLET_REGISTRY_CONTENT_NAME + " stored as id=" + da.getId());
} else {
LOG.info("Updating " + PORTLET_REGISTRY_CONTENT_NAME);
DigitalAssetVO daVO = da.getValueObject();
daVO.setAssetFileSize(new Integer(serial.length));
PortletAssetController.update(daVO, is);
}
is.close();