Commit 2c47cfd6 authored by Jonathan Shahen's avatar Jonathan Shahen

All Reductions done and no runtime errors were found when converting all of...

All Reductions done and no runtime errors were found when converting all of the regressiontests into Mohawk, ASAPTime SA, ASAPTime NSA, TRole, TRule
parent 47bdd63a
......@@ -58,14 +58,14 @@ public class ConverterCUI {
public static void printCommonCommands() {
System.out.println("\n\n--- Common Commands ---");
System.out.println(OptionString.TO_TROLE.c() + OptionString.SPECFILE.c()
+ "data/regressiontests/positive1.spec " + OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_TROLE.c() + OptionString.SPECFILE.c()
+ "data/regressiontests/positive2.spec " + OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_TROLE.c() + OptionString.SPECFILE.c()
+ "data/regressiontests/positive3.spec " + OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_TROLE.c() + OptionString.SPECFILE.c()
+ "data/regressiontests/positive4.spec " + OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_ALL.c() + OptionString.SPECFILE.c() + "data/regressiontests/positive1.spec "
+ OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_ALL.c() + OptionString.SPECFILE.c() + "data/regressiontests/positive2.spec "
+ OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_ALL.c() + OptionString.SPECFILE.c() + "data/regressiontests/positive3.spec "
+ OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println(OptionString.TO_ALL.c() + OptionString.SPECFILE.c() + "data/regressiontests/positive4.spec "
+ OptionString.LOGLEVEL.c() + "debug !exit");
System.out.println("");
}
}
......@@ -19,6 +19,7 @@ import mohawk.converter.logging.MohawkTiming;
import mohawk.converter.to.asaptime.ConvertToASAPTimeNSA;
import mohawk.converter.to.asaptime.ConvertToASAPTimeSA;
import mohawk.converter.to.mohawk.ConvertToMohawk;
import mohawk.converter.to.tred.ConvertToTRole;
import mohawk.converter.to.tred.ConvertToTRule;
import mohawk.global.FileExtensions;
import mohawk.global.pieces.MohawkT;
......@@ -152,19 +153,36 @@ public class ConverterInstance {
logger.info("[CONVERTING] ...Done Converting to ASAPTime SA");
}
if (cmd.hasOption(OptionString.TO_TROLE.toString()) || cmd.hasOption(OptionString.TO_ALL.toString())) {
logger.info("[CONVERTING] Converting to TRole...");
/* Timing */timing.startTimer("convertToTRole (" + i + ")");
ConvertToTRole toTRole = new ConvertToTRole();
toTRole.convert(m, specFile, true);
if (toTRole.lastError == null) {
logger.info("[SUCCESS] Successfully converted to TRole Input Format");
} else {
logger.warning("[FAILURE] Failed to convert to TRole Input Format; Error code "
+ toTRole.lastError);
}
/* Timing */timing.stopTimer("convertToTRole (" + i + ")");
logger.info("[CONVERTING] ...Done Converting to TRole");
}
if (cmd.hasOption(OptionString.TO_TRULE.toString()) || cmd.hasOption(OptionString.TO_ALL.toString())) {
logger.info("[CONVERTING] Converting to TRule...");
/* Timing */timing.startTimer("convertToTRule (" + i + ")");
// TODO: Convert imported spec files to Uzun format
ConvertToTRule toUzun = new ConvertToTRule();
toUzun.convert(m, specFile, true);
ConvertToTRule toTRule = new ConvertToTRule();
toTRule.convert(m, specFile, true);
if (toUzun.lastError == null) {
logger.info("[SUCCESS] Successfully converted to Uzun's Input Format");
if (toTRule.lastError == null) {
logger.info("[SUCCESS] Successfully converted to TRule Input Format");
} else {
logger.warning("[FAILURE] Failed to convert to Uzun's Input Format; Error code "
+ toUzun.lastError);
logger.warning("[FAILURE] Failed to convert to TRule Input Format; Error code "
+ toTRule.lastError);
}
/* Timing */timing.stopTimer("convertToTRule (" + i + ")");
......@@ -175,7 +193,6 @@ public class ConverterInstance {
logger.info("[CONVERTING] Converting to Mohawk...");
/* Timing */timing.startTimer("convertToMohawk (" + i + ")");
// TODO: Convert imported spec files to Mohawk format
ConvertToMohawk toMohawk = new ConvertToMohawk();
toMohawk.convert(m, specFile, true);
......
......@@ -15,6 +15,7 @@ public class ConvertTo {
public FileExtensions fileExt = new FileExtensions(); // allows for custom file extensions
public String convertedStr = null;
public String lastError = null;
public Integer numberOfRules = null;
public String convert(MohawkT m, File f, Boolean writeToFile) {
return null;
......
......@@ -3,7 +3,6 @@ package mohawk.converter.to.asaptime;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.SortedSet;
......@@ -29,37 +28,44 @@ public class ConvertToASAPTimeNSA extends ConvertTo {
@Override
public String convert(MohawkT m, File file, Boolean writeToFile) {
try {
String template = ConvertTo.readFile(this.getClass().getResource("ASAPTimeNSATemplate.st"),
Charset.defaultCharset());
ST st = new ST(template);
ArrayList<ASAPTimeNSA_Rule> rules = new ArrayList<ASAPTimeNSA_Rule>();
// Deep Copy Helpers
RoleHelper roleHelper = new RoleHelper(m.roleHelper);
TimeIntervalHelper timeIntervalHelper = new TimeIntervalHelper(m.timeIntervalHelper);
Query workableQuery = new Query(m.query);
// Reduce Roles to Integers
m.roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
m.roleHelper.setupSortedRoles();
roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
roleHelper.setupSortedRoles();
// Reduce TimeIntervals to Timeslots
m.timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
m.timeIntervalHelper.reduceToTimeslots();
timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
timeIntervalHelper.reduceToTimeslots();
// Convert Query to Reduced ASAPTime NSA Query and add any extra rules as needed
ASAPTimeNSA_Query query = toASAPTimeNSA_Query(m.query, rules, m.roleHelper, m.timeIntervalHelper);
ASAPTimeNSA_Query query = toASAPTimeNSA_Query(workableQuery, rules, roleHelper, timeIntervalHelper);
// Convert Rules into Reduced ASAPTime NSA Rules
for (Rule r : m.getAllRules()) {
rules.addAll(toASAPTimeNSA_Rules(r, m.roleHelper, m.timeIntervalHelper));
rules.addAll(toASAPTimeNSA_Rules(r, roleHelper, timeIntervalHelper));
}
logger.fine("Rules: " + m.getAllRules());
logger.fine("Reduced Rules: " + rules);
// Stats and logging
numberOfRules = rules.size();
logger.finest("Rules: " + m.getAllRules());
logger.finest("Reduced Rules: " + rules);
st.add("numRoles", m.roleHelper.size());
st.add("numTimeslots", m.timeIntervalHelper.sizeReduced());
// Generate the Converted String
String template = ConvertTo.readFile(this.getClass().getResource("ASAPTimeNSATemplate.st"));
ST st = new ST(template);
st.add("numRoles", roleHelper.size());
st.add("numTimeslots", timeIntervalHelper.sizeReduced());
st.add("goalRole", query.goalRole);
st.add("goalTimeslot", query.goalTimeslot);
st.add("rules_nsa", rules);
convertedStr = st.render();
// Potentially write the converted string out to "file + getFileExtenstion()"
if (writeToFile) {
File convertedFile = new File(file.getAbsolutePath() + getFileExtenstion());
......
......@@ -3,7 +3,6 @@ package mohawk.converter.to.asaptime;
import java.io.File;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.SortedSet;
......@@ -29,45 +28,49 @@ public class ConvertToASAPTimeSA extends ConvertTo {
@Override
public String convert(MohawkT m, File file, Boolean writeToFile) {
try {
String template = ConvertTo.readFile(this.getClass().getResource("ASAPTimeSATemplate.st"),
Charset.defaultCharset());
ST st = new ST(template);
ArrayList<ASAPTimeSA_Rule> newRules = new ArrayList<ASAPTimeSA_Rule>();
ArrayList<Rule> workableRules = new ArrayList<Rule>();
workableRules = m.roleHelper.removeEnableDisableRules(m.getAllRules());
// Reduce TimeIntervals to Timeslots
m.timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
m.timeIntervalHelper.reduceToTimeslots();
// Deep Copy Helpers
RoleHelper roleHelper = new RoleHelper(m.roleHelper);
TimeIntervalHelper timeIntervalHelper = new TimeIntervalHelper(m.timeIntervalHelper);
Query workableQuery = new Query(m.query);
workableRules = m.roleHelper.alwaysOnRules(workableRules, workableQuery, m.timeIntervalHelper);
// removeEnableDisableRules and alwaysOnRules are Deep Copies
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
workableRules = roleHelper.alwaysOnRules(workableRules, workableQuery, timeIntervalHelper);
// Reduce TimeIntervals to Timeslots
timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
timeIntervalHelper.reduceToTimeslots();
// Reduce Roles to Integers
m.roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
m.roleHelper.setupSortedRoles();
roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
roleHelper.setupSortedRoles();
// Convert Query to Reduced ASAPTime SA Query and add any extra rules as needed
ASAPTimeSA_Query query = toASAPTimeSA_Query(workableQuery, workableRules, m.roleHelper,
m.timeIntervalHelper);
ASAPTimeSA_Query query = toASAPTimeSA_Query(workableQuery, workableRules, roleHelper, timeIntervalHelper);
// Convert Rules into Reduced ASAPTime SA Rules
for (Rule r : workableRules) {
newRules.addAll(toASAPTimeSA_Rules(r, m.roleHelper, m.timeIntervalHelper));
newRules.addAll(toASAPTimeSA_Rules(r, roleHelper, timeIntervalHelper));
}
logger.fine("Rules: " + m.getAllRules());
logger.fine("Reduced Rules: " + newRules);
// Stats and logging
numberOfRules = newRules.size();
logger.finest("Rules: " + m.getAllRules());
logger.finest("Reduced Rules: " + newRules);
st.add("numRoles", m.roleHelper.size());
st.add("numTimeslots", m.timeIntervalHelper.sizeReduced());
// Generate the Converted String
String template = ConvertTo.readFile(this.getClass().getResource("ASAPTimeSATemplate.st"));
ST st = new ST(template);
st.add("numRoles", roleHelper.size());
st.add("numTimeslots", timeIntervalHelper.sizeReduced());
st.add("goalRole", query.goalRole);
st.add("goalTimeslot", query.goalTimeslot);
st.add("rules_sa", newRules);
convertedStr = st.render();
// Potentially write the converted string out to "file + getFileExtenstion()"
if (writeToFile) {
File convertedFile = new File(file.getAbsolutePath() + getFileExtenstion());
......@@ -82,7 +85,7 @@ public class ConvertToASAPTimeSA extends ConvertTo {
e.printStackTrace(new PrintWriter(errors));
logger.warning(errors.toString());
logger.warning("[ERROR] Unable to convert to Ranise: " + e.getMessage());
logger.warning("[ERROR] Unable to convert to ASAPTime NSA: " + e.getMessage());
lastError = "Error ConvertToRanise.convert.Exception #1";
}
......@@ -157,7 +160,7 @@ public class ConvertToASAPTimeSA extends ConvertTo {
}
// Convert Preconditions to the Role Indexes
// System.out.println("Rule: " + rule);
System.out.println("[toASAPTimeSA_Rules] Rule: " + rule);
for (Role r : rule._preconditions) {
precondition.add(roleHelper.indexOf(r));
}
......
......@@ -18,6 +18,8 @@ import mohawk.global.pieces.Rule;
import mohawk.global.pieces.RuleType;
import mohawk.global.pieces.TimeSlot;
import mohawk.global.pieces.reduced.query.Mohawk_Query;
import mohawk.global.pieces.reduced.rules.MohawkCA_Rule;
import mohawk.global.pieces.reduced.rules.MohawkCR_Rule;
import org.stringtemplate.v4.ST;
......@@ -27,32 +29,50 @@ public class ConvertToMohawk extends ConvertTo {
@Override
public String convert(MohawkT m, File f, Boolean writeToFile) {
try {
String template = ConvertTo.readFile(this.getClass().getResource("mohawkTemplate.st"));
ArrayList<MohawkCA_Rule> newCARules = new ArrayList<MohawkCA_Rule>();
ArrayList<MohawkCR_Rule> newCRRules = new ArrayList<MohawkCR_Rule>();
ArrayList<Rule> workableRules = new ArrayList<Rule>();
workableRules = m.roleHelper.removeEnableDisableRules(m.getAllRules());
// Reduce Roles to Integers
m.roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
m.roleHelper.setupSortedRoles();
// Reduce TimeIntervals to Timeslots
m.timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
m.timeIntervalHelper.reduceToTimeslots();
// Deep Copy Helpers
RoleHelper roleHelper = new RoleHelper(m.roleHelper);
TimeIntervalHelper timeIntervalHelper = new TimeIntervalHelper(m.timeIntervalHelper);
Query workableQuery = new Query(m.query);
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules()); // (3)
workableRules = roleHelper.alwaysOnRules(workableRules, workableQuery, timeIntervalHelper); // (4)
workableRules = roleHelper.removeUninvokablePrecondtions(workableRules, false); // (6)
workableRules = roleHelper.removePrecondtionsCanRevoke(workableRules, false); // (6)
RoleHelper roleHelperTemporality = new RoleHelper(roleHelper);
ArrayList<Object> reducedRules = roleHelperTemporality.removeTemporality(workableRules, timeIntervalHelper);
// Convert Rules into Reduced Mohawk CA and CR Rules (5)
for (Object r : reducedRules) {
if (r instanceof MohawkCA_Rule) {
newCARules.add((MohawkCA_Rule) r);
} else if (r instanceof MohawkCR_Rule) {
newCRRules.add((MohawkCR_Rule) r);
} else {
throw new IllegalArgumentException("Can only convert Can Assign and Can Revoke Rules in Mohawk");
}
}
// Convert Query to Reduced ASAPTime SA Query and add any extra rules as needed
Mohawk_Query query = toMohawk_Query(m.query, workableRules, m.roleHelper, m.timeIntervalHelper);
query.finalize(m.roleHelper);
Mohawk_Query query = toMohawk_Query(workableQuery, newCARules, roleHelper, timeIntervalHelper);
ST st = new ST(template);
st.add("roles", m.roleHelper._roles);
st.add("users", null);
st.add("ua", null);
st.add("cr", null);
st.add("ca", null);
st.add("adminusers", null);
st.add("spec", null);
// Stats and logging
numberOfRules = newCARules.size() + newCRRules.size();
String template = ConvertTo.readFile(this.getClass().getResource("mohawkTemplate.st"));
ST st = new ST(template);
st.add("roles", roleHelperTemporality._roles);
st.add("users", new String[] { "AdminUser", "User" });
st.add("specuser", "User");
st.add("specrole", query.specRole);
st.add("adminuser", "AdminUser");
st.add("adminrole", "AdminRole");
st.add("canrevoke", newCRRules);
st.add("canassign", newCARules);
convertedStr = st.render();
if (writeToFile) {
......@@ -76,13 +96,13 @@ public class ConvertToMohawk extends ConvertTo {
return convertedStr;
}
private Mohawk_Query toMohawk_Query(Query query, ArrayList<Rule> rules, RoleHelper roleHelper,
private Mohawk_Query toMohawk_Query(Query query, ArrayList<MohawkCA_Rule> newCARules, RoleHelper roleHelper,
TimeIntervalHelper timeIntervalHelper) {
// Checking Conditions
assert (query._roles.size() > 0) : "The query must have atleast one Goal Role";
Role newGoalRole = roleHelper.addUniqueRole("goalRole");
Mohawk_Query q = new Mohawk_Query(newGoalRole);
Mohawk_Query q = new Mohawk_Query(newGoalRole, query._timeslot);
Rule newRule = new Rule();
newRule._type = RuleType.ASSIGN;
newRule._adminRole = Role.allRoles();
......@@ -91,15 +111,11 @@ public class ConvertToMohawk extends ConvertTo {
newRule._roleSchedule = new ArrayList<TimeSlot>(Arrays.asList(query._timeslot));
newRule._role = newGoalRole;
rules.add(newRule);
newCARules.add(new MohawkCA_Rule(newRule));
return q;
}
public Integer removeTemporality(Integer roleIndex, Integer timeslotIndex, Integer numberOfRoles) {
return numberOfRoles * (timeslotIndex - 1) + roleIndex;
}
@Override
public String getFileExtenstion() {
return fileExt.Mohawk;
......
Roles $roles; separator=" "$;
<! Roles role0 role1 role2 role3; !>
Roles <roles:{r|r._name}; separator=" ">;
Users $users; separator=" "$;
<! Users user0 user1 user2 user3 user4; !>
Users <users; separator=" ">;
UA $ua; separator=" "$;
<! UA <user4,Admin>; !>
UA \<<adminuser>,<adminrole>\>;
CR $cr; separator=" "$;
<! CR <Admin,role0> <Admin,role2>; !>
CR <canrevoke:{cr|\<<adminrole>,<cr.role>\>}; separator=" ">;
CA $ca; separator=" "$;
<! CA <role3,role2,role0> <role3,role2&role1,role0> <role3,role2&role0,role1> <role3,TRUE,role1> <role3,role0,role1>; !>
CA <canassign:{ca|\<<adminrole>,<if(ca.precondition)><ca.precondition; separator="&"><else>TRUE<endif>,<ca.role>\>}; separator=" ">;
ADMIN $adminusers; separator=" "$;
<! ADMIN user4; !>
ADMIN <adminuser>;
SPEC $spec; separator=" "$;
<! SPEC user0 role1; !>
SPEC <specuser> <specrole>;
......@@ -6,8 +6,6 @@ import java.io.StringWriter;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.logging.Logger;
import mohawk.converter.to.ConvertTo;
......@@ -30,41 +28,47 @@ public class ConvertToTRole extends ConvertTo {
@Override
public String convert(MohawkT m, File file, Boolean writeToFile) {
try {
String template = ConvertTo.readFile(this.getClass().getResource("uzunTemplate.st"));
ArrayList<TRole_Rule> newRules = new ArrayList<TRole_Rule>();
ArrayList<Rule> workableRules = new ArrayList<Rule>();
workableRules = m.roleHelper.removeEnableDisableRules(m.getAllRules());
// Deep Copy Helpers
RoleHelper roleHelper = new RoleHelper(m.roleHelper);
TimeIntervalHelper timeIntervalHelper = new TimeIntervalHelper(m.timeIntervalHelper);
Query workableQuery = new Query(m.query);
workableRules = roleHelper.removeEnableDisableRules(m.getAllRules());
workableRules = roleHelper.alwaysOnRules(workableRules, workableQuery, timeIntervalHelper);
// Reduce Roles to Integers
m.roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
m.roleHelper.setupSortedRoles();
// Reduce TimeIntervals to Timeslots
m.timeIntervalHelper.allowZeroTimeslot = false; // time-slots start from t1 NOT t0!
m.timeIntervalHelper.reduceToTimeslots();
roleHelper.allowZeroRole = false; // roles start from 1 NOT 0!
roleHelper.setupSortedRoles();
// Convert Query to Reduced ASAPTime SA Query and add any extra rules as needed
TRole_Query query = toTRole_Query(m.query, workableRules, m.roleHelper, m.timeIntervalHelper);
TRole_Query query = toTRole_Query(workableQuery, workableRules, roleHelper, timeIntervalHelper);
// Convert Rules into Reduced ASAPTime NSA Rules
for (Rule r : workableRules) {
newRules.addAll(toTRole_Rules(r, m.roleHelper, m.timeIntervalHelper));
newRules.add(new TRole_Rule(r, roleHelper, timeIntervalHelper));
}
// Finalize the Query
query.finalize(roleHelper);
// Stats and logging
numberOfRules = newRules.size();
logger.fine("Rules: " + m.getAllRules());
logger.fine("Reduced Rules: " + newRules);
// Finalize the Query
query.finalize(m.roleHelper);
// Generate the Converted String
String template = ConvertTo.readFile(this.getClass().getResource("uzunTemplate.st"));
ST st = new ST(template);
st.add("numRoles", m.roleHelper.size());
st.add("numTimeSlots", m.timeIntervalHelper.sizeReduced());
st.add("numRoles", roleHelper.size());
st.add("numTimeSlots", timeIntervalHelper.sizeReduced());
st.add("goalStates", query.goalRoles);
st.add("uzunRules", newRules);
convertedStr = st.render();
// Potentially write the converted string out to "file + getFileExtenstion()"
if (writeToFile) {
File convertedFile = new File(file.getAbsolutePath() + getFileExtenstion());
......@@ -77,9 +81,9 @@ public class ConvertToTRole extends ConvertTo {
} catch (Exception e) {
StringWriter errors = new StringWriter();
e.printStackTrace(new PrintWriter(errors));
logger.fine(errors.toString());
logger.warning(errors.toString());
logger.warning("[ERROR] Unable to convert to Ranise: " + e.getMessage());
logger.warning("[ERROR] Unable to convert to TRole: " + e.getMessage());
lastError = "Error ConvertToRanise.convert.Exception #1";
}
......@@ -122,59 +126,6 @@ public class ConvertToTRole extends ConvertTo {
return q;
}
/**
*
* @param rule
* @param roleHelper
* @param timeIntervalHelper
* @return
*/
public ArrayList<TRole_Rule> toTRole_Rules(Rule rule, RoleHelper roleHelper, TimeIntervalHelper timeIntervalHelper) {
// TODO unimplemented method!
if (true) { return null; }
ArrayList<TRole_Rule> rules = new ArrayList<TRole_Rule>();
SortedSet<Integer> adminInterval = timeIntervalHelper.indexOfReduced(rule._adminTimeInterval);
SortedSet<Integer> roleSchedule = new TreeSet<Integer>();
ArrayList<Integer> precondition = new ArrayList<Integer>();
// Convert RoleSchedule to the New Timeslots
for (TimeSlot ts : rule._roleSchedule) {
roleSchedule.addAll(timeIntervalHelper.indexOfReduced(ts));
}
// Convert Preconditions to the Role Indexes
for (Role r : rule._preconditions) {
precondition.add(roleHelper.indexOf(r));
}
logger.fine("Timeslots: " + timeIntervalHelper._timeIntervals);
logger.fine("Reduced Timeslots: " + timeIntervalHelper._reducedTimeIntervals);
logger.fine("Admin Interval: " + adminInterval);
logger.fine("Role Schedule: " + roleSchedule);
TRole_Rule rule_t;
for (Integer adminTimeslot : adminInterval) {
for (Integer roleTimeslot : roleSchedule) {
rule_t = new TRole_Rule();
rule_t.ruleType = rule._type.toRanise();
if (!rule._adminRole.isAllRoles()) { throw new IllegalArgumentException(
"Rule contains a Admin Role that isn't TRUE!"); }
// rule_t.adminTime = adminTimeslot;
rule_t.role = roleHelper.indexOf(rule._role);
rule_t.precondition = precondition.toArray(new Integer[0]);
// rule_t.roleTime = roleTimeslot;
logger.fine("Adding rule to rules");
rules.add(rule_t);
}
}
return rules;
}
@Override
public String getFileExtenstion() {
return fileExt.TRole;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment