* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
- *
+*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
+ *
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*
*******************************************************************************/
import com.att.eelf.configuration.EELFManager;
+//import com.att.ssf.filemonitor.FileChangedListener;
+//import com.att.ssf.filemonitor.FileMonitor;
+
/**
* ServicePropertyService class
- * @author author
+ * @author rajashree.khare
*
*/
public class ServicePropertyService {
* @throws Exception ex
*/
@PostConstruct
- public void init() throws Exception {
+ public void init() {
try {
getFileList(FILE_CHANGE_LISTENER_LOC);
-// for (File file : fileList) {
-// FileChangedListener fileChangedListener = this.fileChangedListener;
-// Object filePropertiesMap = this.filePropertiesMap;
-// Method m = filePropertiesMap.getClass().getMethod(
-// "refresh", File.class);
-// m.invoke(filePropertiesMap, file);
-// FileMonitor fm = FileMonitor.getInstance();
-// fm.addFileChangedListener(file, fileChangedListener,
-// loadOnStartup);
-//
-// }
+ /*for (File file : fileList) {
+ FileChangedListener fileChangedListener = this.fileChangedListener;
+ Object filePropertiesMap = this.filePropertiesMap;
+ Method m = filePropertiesMap.getClass().getMethod(
+ "refresh", File.class);
+ m.invoke(filePropertiesMap, file);
+ FileMonitor fm = FileMonitor.getInstance();
+ fm.addFileChangedListener(file, fileChangedListener,
+ loadOnStartup);
+
+ }*/
} catch (Exception ex) {
logger.error("Error creating property map ", ex);
}
FileInputStream fis = null;
if (fileList == null)
- fileList = new ArrayList<>();
+ fileList = new ArrayList<File>();
// get all the files that are ".json" or ".properties", from a directory
// & it's sub-directories
} catch (Exception ioe) {
logger.error("Error reading the file stream ", ioe);
} finally {
- if (fis != null) {
- fis.close();
- }
+ fis.close();
}
} else if (file.isDirectory()) {
getFileList(file.getPath());