Archive

Posts Tagged ‘Template’

Syncplicity & Custom Plug-ins actions

August 21, 2019 Leave a comment

In the Previous post, I tried to explain the various customization and plug-ins that are available/offered with D2 in this post I will detail my experiences with the custom plug-ins , how to override a D2 Service and how we handle actions in D2. Let me start with a lighter concept with D2 before I jump onto the custom plugins and actions…

Syncplicity

Files can be shared directly from D2 to Syncplicity, allowing content to make available to users inside and outside an organization on multiple devices.  Folders may be synced from a menu option or from a workflow task. An icon is shown on the folder/content to indicate that the content has been synced. Automatic shares can be set up by an administrator and limited to specific document types.  Shares can also be manually initiated by authorized users.


Custom Plug-ins Custom Actions

1

 

2

3


Creating and Configuring a Custom Plug-in – Creating a New Plug-in Using the Template

  1. Rename the Your Co-PluginName project.
  2. Rename com.yourdomainhere.yourplugin in Eclipse to your domain namespace and package name for each package in the plug-in template.
  3. Optionally, rename PluginNameVersion.java and PluginNameVersion.properties ; If you rename the files, you must edit build.properties to reflect the name change.
  4. Edit build.properties and change project.version.file to reflect the package structure and the plug-in properties file name.
  5. Edit PluginNameVersion.properties
  6. Add the plug-in implementation classes. For example: *.webfs.services.content and *.webfs.services.create
  1. Re-run .\build\build.xml to rebuild the plug-in.

How do you create and handle actions, custom actions in D2?

  1. Create a Java class in the <project folder>/src/com/<your namespace>/<plug-in name>/webfs/services/custom/ folder.
  2. Import the d2fs resources:

import java.util.List;

import com.emc.d2fs.dctm.plugin.IPluginAction;

import com.emc.d2fs.dctm.web.services.D2fsContext;

import com.emc.d2fs.models.attribute.Attribute;

  1. Implement IPluginAction: public class <name of the class> implements IPluginAction
  2. The class must contain a method that has at minimum the following format:

public List<attribute> <methodName>(D2fsContext context) throws UnsupportedEncodingException, DfException, D2fsException;

  1. After building and installing the plug-in, create a menu button in D2 Config to allow end users to perform the custom action.

Throwing Exceptions

We can use Exception () and D2fsException () to report exceptions or errors encountered in Service extension or Custom Action code back to D2 and the end user. The following example shows how to use D2fsException ():

public List<Attribute> getCustomDownloadURL(D2fsContext context) throws UnsupportedEncodingException, DfException, D2fsException


Setting Up D2 Service Overrides

  1. Determine the <name of the service> : To determine the <name of the service>, replace the prefix I with D2. For example, IExportService uses the D2 service D2ExportService.
  1. Create a .java file named <name of the service>Plugin.java for the services class to configure the process in the <company name>-<plug-in name>/src/com/<your namespace>/<plug-in name>/webfs/services/<name of the service package>/ folder.
  2. Create and name the class <name of the service>Plugin. For example, the sample uses the service D2ExportService to name its class D2ExportServicePlugin.
  1. Extend the service class with the <name of the service> and implement the ID2fsPlugin interface. For example, the sample declares the class:

public class D2ExportServicePlugin extends D2ExportService implements ID2fsPlugin

The ID2fsPlugin interface forces the implementation of two methods:

  • getFullName: Returns the full plug-in name with its version number. The method is called by the About dialog box in D2.
  • getProductName: Returns the plug-in name to determine whether the plug-in should be executed based on the D2 configuration matrix.

General terminologies used in WCMS

October 27, 2010 Comments off

Below i tried to list out some of the General terminologies used in WCMS:

Site:Used to group a set of Site Areas and Content.

Site Area: Used to build the Site Framework within which content items are grouped.

Authoring Template: Defines what data entry fields appear when creating new Content. Default values can also be entered into an Authoring Template.

Presentation Template: Specifies the design of a displayed page, including the layout of Components in a page and the default properties of a page (background, font, etc.). Presentation Templates allow you to change the look of a page without having to update what is being displayed on a page.

Components: Components are the building blocks of a Web Content Management environment. They either store content that can then be referenced in another Web Content Management item (e.g., Text Component, Image Component), or generate content based on selected parameters (e.g., Menus, Navigators).

Personalization Component: References content based on Web Sphere Portal Personalization rules and displays the content as Web Content Management Components.

Taxonomy and Categories: A Category refers to the subject matter of your content, i.e., what your content is about. For example, your news content may be of the category “Sports”, “Travel”, or “Entertainment”. Categories can be used to determine what links will display in a menu. Categories are grouped within Taxonomies.

Workflow: controls access to, verification and eventual approval of Web Content Management Items. Only if an item is approved at all stages up to a published stage can it be viewed on your web site.

Important Terms in Interwoven Teamsite

May 20, 2010 Comments off

Below are few of the important Terms used extensively in Teamsite :

Data Capture

The Data Capture sub-system enables the user to work with forms which are created through a ‘Data Capture Template’ (DCT). Once the user fills the required content in the DCT and saves it, a ‘Data Capture Record’ (DCR) is generated, which gets stored in the tool’s file system. This data is saved as an XML and is utilized to fill the ‘Presentation Template’ which governs the look of the final web page.
This sub-system can be employed in a TeamSite Templating Browser or a java environment.

The ‘Data Capture Subsystem’ consists of a series of Java applications to carry out the following tasks:

o Study datacapture.cfg and templating.cfg files and decide what data a user should be able to view
through WebDesk or WebDeskPro.
o Deduce the input of the person entering the data.
o Save the data entered in the required format.

Data Capture Template

A ‘Data Capture Template’ (DCT) consists of an XML file named datacapture.cfg which specifies the form to be used to get the data content from its subscribers.

It comprises of:

o Category
o Type

These specify what type of data the DCT uses. The content entered in the DCT is saved as an XML on TeamSite. One DCT can be used to generate multiple DCRs.

Data Presentation

Once the DCR gets created after the data entry in the DCT, the page can be generated through the page generation sub-system reachable by the command line. This enables the user to view the required data in the required format. An output file can also be created that uses data from more than one DCRs and database queries. This output file may also be deployed to a web server using OpenDeploy.

Presentation Template

A ‘Presentation Template’ specifies how the data entered looks on the generated page.

The data present in this template is obtained from the DCRs which was initially entered in the DCT. The TeamSite Templating can also be designed to fill the presentation template with selective information from a relational database.

These can also be used with:

o Component templates – i.e., a component of another presentation template or a nested template.
o A single DCR to fill multiple presentation templates, all having a different appearance and display.

It uses an XML file with extension .tpl.

The ‘Page Generation System’ is a simple sequence of programs and libraries, which helps to:

o Examine the presentation template and templating.cfg configuration files and
decide the user should be able to view through the TeamSite GUI.
o Deduce the input of the person entering the data.
o Use the DCR and presentation templates to generate the required results.

Data Content Record

A Data Content Record ‘DCR’ is XML file. It has the design information along with the data entered in the DCTs. The name of the DCR is user specific.

Categories: INTERWOVEN Tags: , , , , , ,

How and When to Use Save() method in TBO ?

May 10, 2010 Comments off

The save method can be used in TBO class to extend the default behavior and provide own custom implementation for validations and so on.

Generally , Creating a document in WebTop involves 3 steps: filling the ‘Create’ tab, ‘info’ tab, and ‘Permissions’ tab. User has to click on Next and Finish buttons to complete the activity of creating document. Also user has the option to select a document template in the ‘Create’ tab. This selection of template and clicking of buttons Next and Finish needs to be captured.

Consider a case in which a new document is created in WebTop and based on attributes entered in the document metadata (fields in ‘Info’ tab) a folder structure needs to be created.

save() method can be overridden in the TBO class for different scenarios: When document is created in WebTop using a template and when not using a template.

CASE 1 : When a template is used for creating document in WebTop, before the Finish button is
clicked,

1) The version label attribute (r_version_lablel) of the document object is always updated as ‘1.0, Current, _NEW_’.

2) Also, save() method in the TBO class is called twice, once when NEXT button is clicked on ‘Create’ tab and second time when Finish button is clicked.

CASE 2 : When no template is used for creating document (for example: creating documents without
any content)

1) The version label is always 1.0, Current.

2) The save() method is called only once, when NEXT button is clicked in ‘Create’ tab. When Finish button is clicked, the method called is saveLock().

While using TBO for custom object type, we can use a dummy attribute and r_version_label attributes to keep track of which button is clicked in the above two scenarios. The reason for this kind of check is the folder structures should get created only when Finish button is clicked. Otherwise the folder structure created needs to be deleted if the user clicks on Cancel button while creating document.

Below if the Code Snippet illustrating the same:

public void save() throws DfException {
IDfSession session = null ;
IDfPersistentObject docObject = null ;
try{
session = getSession() ;
docObject = session.getObject(getObjectId()) ;
}catch( Exception e ) {

// failed to create

if( e instanceof DfException )
throw (DfException)e;
throw new DfException( DfException.DM_NOTDFC_E_JAVA,
e.toString() );
}

// THE ATTRIBUTE ‘subject’ CAN BE A DUMMY ATTRIBUTE

if(docObject.getString(“subject”).equals(“”)){
docObject.setString(“subject” ,”false”) ;
}
super.save();
try{
docObject = session.getObject(getObjectId()) ;

// RETRIEVING THE VALUES OF THE ATTRIBUTE ‘r_version_label’

String str =
docObject.getAllRepeatingStrings(“r_version_label”,”,”) ;
if(str.indexOf(“_NEW_”) > 0 ){

// WITH TEMPLATE

docObject.setString(“subject”,”true”) ;
super.save();
}else{
if(docObject.getString(“subject”).equals(“true”)){

// WITH TEMPLATE, FINISH button

docObject.setString(“subject”,”false”) ;

// can create folders

}
}
}catch( Exception e ) {

// failed to create

System.out.println(“exception :”+e.toString());
if( e instanceof DfException )
throw (DfException)e;
throw new DfException( DfException.DM_NOTDFC_E_JAVA,
e.toString() );
}
}
}

In my next post i will try to discuss how to use the savelock() and checkInEx(…) methods.

%d bloggers like this: