Sunday, August 30, 2009

Now I'm a FCP Content Manager Administrator 4.0

The certification test was actually very easy, I could have passed the test with less effort, but in the end it's not a waste of time to learn more =)

Sunday, August 23, 2009

Windows/Linux - Identifying used ports

  1. Use netstat utility to identify ports used.
  2. Netstat formats are as follows:
    • Windows: netstat -a -p tcp
    • Linux: netstat -a -n -p –t

Windows - Providing an alias for an IP address

  1. Locate the Windows hosts file at C:\windows\system32\drivers\etc.
  2. Use Notepad only to open the hosts file.
  3. Create a new line or choose an empty line.
  4. Type the IP address that you want to map with an alias.
  5. Press the Tab key once.
  6. Type the desired alias.
  7. Save your changes.
Open a command line window, ping the alias that you provided before and you'll see a response from the server (given that the server is network accessible).

Monday, August 17, 2009

Connecting to FileNet P8 using the Content Engine APIs

//This simple code is actually commonly used, almost "as is" when connecting to an object store,
//there are still few improvements you could do, but it's OK to start testing your connection to a
//FileNet P8 domain. I almost took this code exactly from a training session that I
//had for FileNet P8 4.0 Content Engine development


import java.util.Iterator;

import javax.security.auth.Subject;

import com.filenet.api.collection.ObjectStoreSet;
import com.filenet.api.core.Connection;
import com.filenet.api.core.Domain;
import com.filenet.api.core.Factory;
import com.filenet.api.core.ObjectStore;
import com.filenet.api.util.UserContext;

public class CEConnection{

public Connection getCEConnection(){
Connection connection = Factory.Connection.getConnection("iiop://myServer:2809/FileNet/Engine");
Subject subject = UserContext.createSubject(connection, "administrator", "password", null);
UserContext userContext = UserContext.get();
userContext.pushSubject(subject);
return connection;
}

public Domain getDomain(Connection connection){
String domainName = "P8domain";
Domain domain = Factory.Domain.fetchInstance(connection, domainName, null);
System.out.println("Domain name: "+domain.get_Name());
return domain;
}

public void getObjectStores(Domain domain){
ObjectStoreSet objectStoreSet = domain.get_ObjectStores();
ObjectStore objectStore;
Iterator objectStoreIterator = objectStoreSet.iterator();
System.out.println("Available object stores: ");
while(objectStoreIterator.hasNext()){
objectStore = (ObjectStore)objectStoreIterator.next();
System.out.println("*"+objectStore.get_DisplayName());
}
}

public ObjectStore getObjectStore(Domain domain, String objectStoreName){
ObjectStore objectStore = null;
objectStore = Factory.ObjectStore.fetchInstance(domain, objectStoreName, null);
return objectStore;
}

public static void main(String[] args) {
try {
CEConnectionEDU connectionEDU = new CEConnectionEDU();
Connection connection = connectionEDU.getCEConnectionEDU();
Domain domain = connectionEDU.getDomainEDU(connection);
connectionEDU.getObjectStoresEDU(domain);
System.out.println(connectionEDU.getObjectStoreEDU(domain, "MyObjectStore").get_DisplayName());
} catch (Exception e) {
e.printStackTrace();
}

}
}

Sunday, August 16, 2009

My blog for software programming stuff

Well, I have decided to start this blog exclusively for posting about my own experiences as a software programmer, and as way to keep track of my own findings and interesting stuff I collect from the web or that I find by myself when solving the problems I need to solve in my work or when doing software programming for fun.

Don't expect to make sense from my posts, I could say it's mainly for my own use in order to track my own things, but if it's useful to you, feel free to check it.

Best regards!