private static final String STR_TCPGW_PROTOCOL = "tcpgw";
private static final String STR_NO_PROTOCOL = "nopro";
+ private static final String STR_ADD_MAC_EXT = ".tomoyo";
private static final String STR_MAC_POLICY_EXT = ".tomoyo.pol";
private static final String STR_OBJECT_NAME = "<object-name>";
private static final String STR_OBJECT_CLASS_NAME = "<object-class-name>";
}
}
+
+ /**
+ * flush() flushes all PrintWriter objects
+ *
+ * @return void
+ */
+ public void flush() {
+
+ for(PrintWriter pwConfig: mapHostToFile.values()) {
+ pwConfig.flush();
+ }
+ }
+
/**
* close() closes all PrintWriter objects
}
+ /**
+ * combineAdditionalMACPolicy() method combines the additional MAC policies into the right host policy file
+ *
+ * @param strConfigHost String hostname to be configured
+ * @param strFileName String policy file path and name
+ * @return void
+ */
+ public void combineAdditionalMACPolicy(String strMACCfgPath, String strObjectName, String strConfigHost) {
+
+ PrintWriter pwConfig = getPrintWriter(strConfigHost);
+ String strPolicyList = readFile(strMACCfgPath + strObjectName + STR_ADD_MAC_EXT);
+ pwConfig.println(strPolicyList);
+ }
+
+
/**
* combineControllerMACPolicies() method combines the controller MAC policies into the right host policy file
*