Posts Tagged ‘CSDT Command Line tool’


We have seen in the previous post about how to Export using CSDT Command Line Tool in Oracle WebCenter Sites / Fatwire.

Today we will see how we can Import using CSDT Command Line Tool in Oracle WebCenter Sites / Fatwire utilizing the exported data which is created earlier.

Before seeing how to use the Import using csdt command line tools, we should know what is meant by import first.

Import:

As the name itself is suggesting, it is the process of creating / importing the assets in(to) the content server. Here, assets means any thing inside the Content Server, right from start menus to templates. Everything. So we can import everything using this process.

Ok..How to use it?

Lets come to the point of how to do the import process using CSDT command line tools.

The syntax of csdt command line is as follows, which is common for both export and import.

java com.fatwire.csdt.client.main.CSDT [ContentServer url]  username= username password= password cmd=export|import|listcs|listds [options]

What are the parameters?

1. SERVER_INFO=http://:ContentServer         —- This is the server into which the assets need to be imported.

2. USER_NAME=fwadmin (or any other user name)

3. PASSWORD=xceladmin (or any other user’s password)

4. CLASSPATH= Path to the  csdt-client-11.1.1.8.0.jar and lib folders present inside the csdt-client folder. For example:

If you have placed your csdt-client folder inside the Content server installation directory, then the class path should be:

/csdt-client/csdt-client-11.1.1.8.0.jar:/csdt-client/lib/*
5. IMPORT_FOLDER_LOCATION=<Content server installation directory>/export/envision/cs_workspace/

This is the location where CSDT files needs to be moved before importing
6. DATA_STORE=/src

Say for example if your folder is CSDT_Backup_Files, then the path should be    /CSDT_Backup_Files/src.

Finally to execute the Import process , make sure that your target content server is running, and run the below command.

In the export process earlier, we have given the 13 digit content server id of the CSElement. But now to import, we need to give the UID created by the content server.

java -classpath $CLASSPATH com.fatwire.csdt.client.main.CSDT $SERVER_INFO username=$USER_NAME password=$PASSWORD resources=CSElement:ca572d73-ade3-4535-bc32-e2311b43fbb8 cmd=import

The above command exports the CSElement  which has the id 1326492057112, to the directory said above called CSDT_Backup_files.

How do I import other resources?

Below are the different resources which can be specified in the import script.

– @SITE – Specify the desired sites
– @ROLE – Specify the desired roles
– @ASSET_TYPE – Specify the desired asset types
– @TREETAB – Specify the desired tree tabs
– @STARTMENU – Specify the desired start menu items
– @ELEMENTCATALOG – Specify the desired ElementCatalog entries
– @SITECATALOG – Specify the desired site catalog entries
– @ALL_NONASSETS – Use this short-hand notation to select all non-asset resources
– @ALL_ASSETS – Use this short-hand notation to select all available assets
– asset type – Specify assets of a certain type.

That’s it.. your content is imported to the target machine.

Advertisements

CSDT Introduction:

CSDT stands for Content Server Developer Tools. This is a great feature provided in Oracle WebCenter Sites that helps the developers to easily import and export assets from one environment to the other environment, such as from DEV to UAT, etc.

This CSDT can be used in two ways.

1. Eclipse – CSDT Plugin:  This is a  plugin which can be embedded and used within eclipse, so that the developers can synch the assets between his workspace and local JSK instance(or any other dev server instance for that matter), and vice-versa.   You can see how to integrate this plugin with eclipse in one of my previous post. Click Here to read the article.

2. Command Line Tool : This is where we use the command line options for exporting and importing the assets between environments. The Developer Tools command-line tool can be used for deployment and other resource movement activities (like assets as said above). Unlike the Eclipse integration, which enables you to work only with the eclipse workspace, the command-line tool enables you to work with any
workspace. The main feature of using the command-line tool is that it provides import and export features which are not available when working in the Eclipse IDE.

How to use the Command-Line Tool:

To use the command line tool, one should use the csdt.zip provided with the Oracle WebCenter Sites installation unit, or with the patches. Make sure that you use the same csdt.zip from the patch which you have applied on your environment (In case if you have applied any patch).

Unzip the csdt.zip file, and you should be able to see two folders inside it.

  • csdt-client
  • csdt-eclipse

The csdt-eclipse folder contains the plugin for integrating with Eclipse.

The csdt-client will have a jar file which is responsible for the command line tools activity, and a lib folder. Under the lib folder you will have some more jar files which are required by the csdt command line tools.  Say for example, if you are using 11.1.1.8 version of Oracle WebCenter Sites, then you should see the following inside the csdt-client folder.

  • csdt-client-11.1.1.8.0.jar
  • lib
    • cas-client-core-3.1.9.jar
    • commons-logging-1.1.1.jar
    • cs-core-11.1.1.8.0.jar
    • rest-api-11.1.1.8.0.jar
    • …. etc

In the upcoming posts, we will see how we can use the CSDT Command line option to export assets like CSElements, Templates, all other assets.

Click on the below links for Export and Import using CSDT Command Line Tools.

1. Import using CSDT Command Line Tool in Oracle WebCenter Sites / Fatwire

2. Export using CSDT Command Line Tool in Oracle WebCenter Sites / Fatwire