.. java:import:: org.apache.commons.collections CollectionUtils .. java:import:: org.apache.commons.collections Predicate .. java:import:: org.motechproject.security.domain MotechSecurityConfiguration .. java:import:: org.motechproject.security.domain MotechURLSecurityRule .. java:import:: org.motechproject.security.helper IDTransformer .. java:import:: org.slf4j Logger .. java:import:: org.slf4j LoggerFactory .. java:import:: org.springframework.beans.factory.annotation Autowired .. java:import:: org.springframework.stereotype Repository .. java:import:: java.util ArrayList .. java:import:: java.util Collection .. java:import:: java.util Iterator .. java:import:: java.util List AllMotechSecurityRules ====================== .. java:package:: org.motechproject.security.repository :noindex: .. java:type:: @Repository public class AllMotechSecurityRules Implementation of DAO interface that utilizes a MDS back-end for storage. Only one MotechSecurityConfiguration file should be saved at a time, so adding the document looks for the old document in order to update it if it already exists. Rather than updating the object reference, the old configuration's ID and revision are used for the new document. Methods ------- addOrUpdate ^^^^^^^^^^^ .. java:method:: public void addOrUpdate(MotechSecurityConfiguration config) :outertype: AllMotechSecurityRules getMotechSecurityConfiguration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public MotechSecurityConfiguration getMotechSecurityConfiguration() :outertype: AllMotechSecurityRules getRuleById ^^^^^^^^^^^ .. java:method:: public MotechURLSecurityRule getRuleById(Long id) :outertype: AllMotechSecurityRules getRules ^^^^^^^^ .. java:method:: public List getRules() :outertype: AllMotechSecurityRules getRulesByOrigin ^^^^^^^^^^^^^^^^ .. java:method:: public List getRulesByOrigin(String origin) :outertype: AllMotechSecurityRules remove ^^^^^^ .. java:method:: public void remove(MotechSecurityConfiguration config) :outertype: AllMotechSecurityRules setDataService ^^^^^^^^^^^^^^ .. java:method:: @Autowired public void setDataService(MotechURLSecurityRuleDataService dataService) :outertype: AllMotechSecurityRules