Java
-
Documentum: Software to Download Documents and Metadata
I have written a software in Java using DFC. This software performs the following tasks: Performs export or import of documentum data Download all documents given a folder/cabinet in Documentum Download all document metadata, including custom metadata without having to specify the specific fields All the metadata is saved in an xml file The field Continue reading
-
Java: Log4J Logging different levels to different appenders
The following log4j.properties file will do the following: Only log ERROR level messages from all custom and third party libraries Log all DEBUG level messages from com.dctm.utils package to logfilename.log Log all INFO level messages to the Console # Root logger option log4j.rootLogger=ERROR, file, stdout log4j.logger.com.dctm.utils=DEBUG # Direct log messages to a log file Continue reading
-
Java: Singleton Pattern
In most cases, instances of objects are created, which result in several objects being created from the same class. Using the Singleton pattern, we can ensure that only a single object of this class is created during the lifetime of the application. Step 1: Create a Singleton Class public class SingletonClass { //Create singleton Continue reading
-
Setting up Spring Security in Eclipse – III
Using Method based Security Scenario: Only an account holder can deposit or withdraw money. Only an employee can charge fees to the account, and only a manager can allow overdraft on an account. ——————————————————————— Modify WEB-INF/applicationContext-security.xml by adding the following line under the root element: <global-method-security secured-annotations=”enabled” /> ——————————————————————— Create a new xml called WEB-INF/applicationContext-security.xml Continue reading
-
Setting up Spring Security in Eclipse – II
Setting up Spring Security – Using URL based Security Scenario: There is a bank called NoFraudBank, which has two branches – HisBranch and HerBranch. Each branch has 4 employees – a Manager, a Teller Supervisor, and two Tellers. Each branch has one account, being a small privately owned bank. The bank allows the account holders Continue reading
-
Setting up Spring Security in Eclipse – I
Setting up Spring Create a new Dynamic Web Project in Eclipse (needs Web tools download from Eclipse) with the following parameters: Project name: <your-project-name> Rest default settings Download and unzip the latest Spring jar files from http://www.springsource.org/download/community?project=Spring%2520Framework Copy the following files from the above unzipped folder into the Web/WEB-INF/lib folder: org.springframework.asm-3.x.x.RELEASE-x.jar org.springframework.beans-3. x.x.RELEASE-x.jar org.springframework.context-3. x.x.RELEASE-x.jar Continue reading
-
Understanding Spring Security
Spring Security, formerly known as Acegi Security, is a framework that provides a way to secure your spring application. As you look for online resources on Spring Security, you will find several people using it with Grails as well. I am not familiar with Grails, so we will discuss only spring based applications, specifically web Continue reading
-
Java: How to extract lines matching a pattern from text file
Here’s some code I wrote in java to extract filepaths from a log file: import java.io.*; /** * Created by amitabh on 12/14/15. */ import java.util.regex.Matcher; import java.util.regex.Pattern; public class ReadFile { public static void main(String[] args) throws Exception { //String folderPath = “U:\\Upgrade_DMFileReport_Compare\\dm_FileReport-EDMS-Prod_Orig”; //String folderPath = “U:\\Upgrade_DMFileReport_Compare\\dm_FileReport-Legacy-Prod_Orig”; String folderPath = Continue reading
-
Java: Abstract Factory Pattern
AbstractFactory Pattern is a sort of super factory pattern. In this example we will create a factory of objects where each factory creates items just as in the regular Factory pattern. /* Class: ItemType.java */ public interface ItemType{ void doSomething(); } Item1.java /* Class: Item1.java */ public class Item1 implements Factory{ @Override public void doSomething(){ Continue reading
-
Java: Factory Pattern
Factory Pattern is one of the most common design patterns. In this example we will create a Factory interface, and concrete classes to implement this interface. /* Class: ItemType.java */ public interface ItemType{ void doSomething(); } Item1.java /* Class: Item1.java */ public class Item1 implements Factory{ @Override public void doSomething(){ System.out.println(“My Item 1.”); } } Continue reading
About Me
Senior Software Engineer professional with over 16 years of success with multiple open source technologies and various Content Management platforms and solutions.
Proven technical abilities through numerous projects involving enterprise web application design and development, application installation, configuration and support, and workflow and collaboration system designs.
- Ability to learn new technologies and platforms quickly and apply them to the task at hand.
- Excellent analytical skills, and strong communication and collaboration abilities.
- Technical emphasis in including but not limited to Java, Ruby on Rails, Documentum and Alfresco
in both Linux and Windows based environments