Monday, January 20, 2014

Java program to find IP Address of localhost


import java.net.UnknownHostException;

/**
 * Simple Java program to find IP Address of localhost. This program uses
 * InetAddress from java.net package to find IP address. 
 *
 * @author Javin Paul
 */
public class IPTest {
  
    public static void main(String args[]) throws UnknownHostException {
        InetAddress addr = InetAddress.getLocalHost();
        String ipAddress = addr.getHostAddress();
        System.out.println("IP address of localhost: " + ipAddress);
        String hostname = addr.getHostName();
        System.out.println("Name of hostname : " + hostname);
    }
}

Output:
IP address of localhost from Java Program: 190.12.209.123
Name of hostname : PCLOND3433

Source: http://javarevisited.blogspot.in/2012/09/java-program-to-find-ip-address-of.html

Tuesday, January 7, 2014

Webcenter Sites: Asset, Asset Type, Asset definition

An asset represents a piece of content, such as an article or an image, that is managed in WebCenter Sites. It consists of a set of properties that helps distinguish it from other assets of the same type.

An asset type is a schema for distinguishing content types from one another. It is made up of a set of attributes, which can also be described as a set of fields on an asset creation form.

An asset type is a set of attribute names, while an asset is a set of attribute values.
An asset is an instance of an asset type.

When you create a new asset type for your CM site, a table in the database is also created, named for the asset type, that will store its instances (the assets). The columns in the database table correspond to the attribute names, while the rows correspond to its asset instances.

Asset definition controls the asset creation form. In particular, one can determine what attribute fields appear on the form and what order they appear in, as well as which attribute fields are mandatory versus optional.


Core asset types ship with WebCenter Sites by default. These are asset types that are typically used to support the structure of your CM site and website. Core asset types can be categorized as follows:
1. Container Assets: They "contain" lists of assets. Collection, Recommendation
2. Developer Assets: Query, Template, CSElement, Site Entry, Attribute Editor

Core "content" asset types does not ship with WebCenter Sites, such as articles, images, and media types.

All assets can be divided into two loosely defined categories: 
1. Content assets are items that visitors read and examine on your site. 
2. Design assets are items that organize and format the content assets. 

The assets available to a site depend on the content applications and sample sites that are installed. As a general rule, the applications deliver design assets, and the sample sites deliver content assets.

WebCenter Sites: Product Architecture


WebCenter Sites The base application for web experience and content management
WebCenter Sites: Community Management of user-generated content, such as comments, ratings, and polling
WebCenter Sites: Gadgets Management of gadgets for use on websites such as iGoogle
WebCenter Sites: Engage Management of segments and strategic marketing tools
Content Connectors For integration with other source repository systems, such as WebCenter Content, Documentum, Sharepoint, or file systems
WebCenter Sites: Analytics Reporting of website content usage
Remote Satellite Server Edge caching application for larger-scale deployments