1 19 package org.openharmonise.him.actions.rules; 20 21 import org.openharmonise.vfs.*; 22 23 31 public class SecurityRule implements EnableRule { 32 33 boolean m_bComparator = true; 34 35 38 String m_sMethod = null; 39 40 45 public SecurityRule(String sMethod) { 46 super(); 47 this.m_sMethod = sMethod; 48 } 49 50 53 public boolean isEnabled(VirtualFile vfFile) { 54 boolean bEnabled = false; 55 56 if(vfFile!=null && vfFile.getAllowedMethods().contains(this.m_sMethod)) { 57 bEnabled = true; 58 } 59 60 return this.m_bComparator==bEnabled; 61 } 62 63 66 public void setResultComparator(boolean bComparator) { 67 this.m_bComparator = bComparator; 68 } 69 70 } 71 | Popular Tags |