public List<InboxEntry> readEntries(String fileName, String propertyName) throws RulesRepositoryException { try { Val property = getProperty(fileName, propertyName); if (!(property.value == null || property.value.equals(""))) { return (List<InboxEntry>) getXStream().fromXML(property.value); } else { return new ArrayList<InboxEntry>(); } } catch (RepositoryException e) { log.error("Unable to readEntries", e); throw new RulesRepositoryException(e); } }
public List<InboxEntry> readEntries(String fileName, String propertyName) throws RulesRepositoryException { try { Val property = getProperty(fileName, propertyName); if (!(property.value == null || property.value.equals(""))) { return (List<InboxEntry>) getXStream().fromXML(property.value); } else { return new ArrayList<InboxEntry>(); } } catch (RepositoryException e) { log.error("Unable to readEntries", e); throw new RulesRepositoryException(e); } }
public void writeEntries(String fileName, String boxName, List<InboxEntry> entries) throws RulesRepositoryException { try { String entry = getXStream().toXML(entries); setProperty(fileName, boxName, new UserInfo.Val(entry)); } catch (RepositoryException e) { log.error("Unable to writeEntries", e); throw new RulesRepositoryException(e); } }
public void writeEntries(String fileName, String boxName, List<InboxEntry> entries) throws RulesRepositoryException { try { String entry = getXStream().toXML(entries); setProperty(fileName, boxName, new UserInfo.Val(entry)); } catch (RepositoryException e) { log.error("Unable to writeEntries", e); throw new RulesRepositoryException(e); } }