/**
* Cambria Generic Exception
*/
- if(ex instanceof CambriaApiException)
- {
+ /*if(ex instanceof CambriaApiException)
+ {*/
errRes = ex.getErrRes();
if(errRes!=null) {
}
- }
+ /*}
else
{
errRes = new ErrorResponse(HttpStatus.SC_NOT_FOUND,
errRes.getErrMapperStr()).build();
return response;
- }
+ }*/
}
* Update method
*/
//@Override
- public void update(File file) throws Exception
+ /*public void update(File file) throws Exception
{
ServicePropertiesMap.refresh(file);
- }
+ }*/
}
*******************************************************************************/
package com.att.nsa.dmaap.filemonitor;
-import java.io.File;
-import java.io.FileInputStream;
import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
/**
* ServicePropertiesMap class
* @param file file
* @throws Exception ex
*/
- public static void refresh(File file) throws Exception
+ /*public static void refresh(File file) throws Exception
{
try
{
logger.error("File " + (file != null?file.getName():"") + " cannot be loaded into the map ", e);
throw new Exception("Error reading map file " + (file != null?file.getName():""), e);
}
- }
+ }*/
/**
* Get property
* @param fileName fileName
* @throws Exception ex
*/
@PostConstruct
- public void init() throws Exception {
+ public void init() {
try {
getFileList(FILE_CHANGE_LISTENER_LOC);
public String producer;
public String whitelist;
public String status;
- public int numStreams =1;
- public boolean enablelogCheck = false;
+ private int numStreams =1;
+ private boolean enablelogCheck = false;
public String getStatus() {
return status;
public void tearDown() throws Exception {\r
}\r
\r
- @Test\r
- public void testUpdate() {\r
+ //@Test\r
+ public void testUpdate() {/*\r
\r
ServicePropertiesListener listener = new ServicePropertiesListener();\r
\r
\r
assertTrue(true);\r
\r
- }\r
+ */}\r
\r
}
\ No newline at end of file
public void tearDown() throws Exception {\r
}\r
\r
- @Test\r
+ /*@Test\r
public void testRefresh() {\r
\r
try {\r
\r
@Test\r
public void testRefreshPropsFile() throws Exception {\r
- /*Path resourceDirectory = Paths.get("src/test/resources");\r
- map.refresh(new File(resourceDirectory+"\\"+"test.properties"));*/\r
+ Path resourceDirectory = Paths.get("src/test/resources");\r
+ map.refresh(new File(resourceDirectory+"\\"+"test.properties"));\r
ClassLoader classLoader = getClass().getClassLoader();\r
map.refresh(new File(classLoader.getResource("test.json").getFile()));\r
assertTrue(true);\r
- }\r
+ }*/\r
\r
@Test\r
public void testGetProperty() {\r