public static String logTableLimit;
public static String systemAlertTableLimit;
- protected static Map<String, String> dropDownMap = new HashMap<String, String>();
+ protected static Map<String, String> dropDownMap = new HashMap<>();
public static Map<String, String> getDropDownMap() {
return dropDownMap;
}
//MicroService Model Properties
public static String msEcompName;
public static String msPolicyName;
+
+ //WebApp directories
+ public static String configHome;
+ public static String actionHome;
@Autowired
private PolicyController(CommonClassDao commonClassDao){
//Micro Service Properties
msEcompName=prop.getProperty("xacml.policy.msEcompName");
msPolicyName=prop.getProperty("xacml.policy.msPolicyName");
+ //WebApp directories
+ configHome = prop.getProperty("xacml.rest.config.webapps") + "Config";
+ actionHome = prop.getProperty("xacml.rest.config.webapps") + "Action";
//Get the Property Values for Dashboard tab Limit
try{
logTableLimit = prop.getProperty("xacml.ecomp.dashboard.logTableLimit");
}
private static void buildFunctionMaps() {
- mapDatatype2Function = new HashMap<Datatype, List<FunctionDefinition>>();
- mapID2Function = new HashMap<String, FunctionDefinition>();
+ mapDatatype2Function = new HashMap<>();
+ mapID2Function = new HashMap<>();
List<Object> functiondefinitions = commonClassDao.getData(FunctionDefinition.class);
for (int i = 0; i < functiondefinitions.size(); i ++) {
FunctionDefinition value = (FunctionDefinition) functiondefinitions.get(i);
@RequestMapping(value={"/get_FunctionDefinitionDataByName"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE)
public void getFunctionDefinitionData(HttpServletRequest request, HttpServletResponse response){
try{
- Map<String, Object> model = new HashMap<String, Object>();
+ Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
model.put("functionDefinitionDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(FunctionDefinition.class, "shortname")));
JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
}
public static Map<String, Roles> getUserRoles(String userId) {
- Map<String, Roles> scopes = new HashMap<String, Roles>();
+ Map<String, Roles> scopes = new HashMap<>();
List<Object> roles = commonClassDao.getDataById(Roles.class, "loginId", userId);
if (roles != null && roles.size() > 0) {
for (Object role : roles) {
public void getUserRolesEntityData(HttpServletRequest request, HttpServletResponse response){
try{
String userId = UserUtils.getUserSession(request).getOrgUserId();
- Map<String, Object> model = new HashMap<String, Object>();
+ Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
model.put("userRolesDatas", mapper.writeValueAsString(getRolesOfUser(userId)));
JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
} catch (Exception e) {
LOGGER.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR+"Exception Occured while loading PAP"+e);
}
- Map<String, Object> model = new HashMap<String, Object>();
+ Map<String, Object> model = new HashMap<>();
return new ModelAndView("policy_Editor","model", model);
}
String[] splitDBCheckName = dbCheckName.split(":");
String query = "FROM PolicyEntity where policyName like'"+splitDBCheckName[1]+"%' and scope ='"+splitDBCheckName[0]+"'";
List<Object> policyEntity = commonClassDao.getDataByQuery(query);
- List<String> av = new ArrayList<String>();
+ List<String> av = new ArrayList<>();
for(Object entity : policyEntity){
PolicyEntity pEntity = (PolicyEntity) entity;
String removeExtension = pEntity.getPolicyName().replace(".xml", "");