Develop Your Custom Component

Use the cec command-line utility to create a new component, develop the component locally, and then export the component to Oracle Content Management.

Create a Component

To create and develop a custom component locally, use the following command:

cec create-component <component-name> -f <source>

Choose one of the following values for source:

  • JET-CCA-Demo-Card
  • local

  • local-iframe

  • Sample-Facebook-Share

  • Sample-News-API

  • Sample-Stocks-Embedded

  • Sample-To-Do

  • Sample-Text-With-Image

  • Sample-Weather-Embedded

  • Sample-Folder-List

  • Sample-File-List

  • Sample-Documents-Manager

  • Sample-Process-Start-Form

  • Sample-Process-Task-List

  • Sample-Process-Task-Details

  • SimpleHTML

Example:

cec create-component MyLocalComponent1 -f local

The component is created in your Git repository under cec-components/src/main/components.

The src/main/components directory is seeded with the Sample-To-Do component. All components that you create go in this directory.

Copy a Component

You can copy a component in Developer Cloud Service with the cec copy-component command:

cec copy-component <source> [<destination>]

This command copies an existing component named <source> to <destination>.

Export or Deploy the Component to Oracle Content Management

Once the component is developed and tested in the local server, you can export the component using the following command. This creates the component zip file. You can manually import this component zip into Oracle Content Management.

cec export-component <component name>

Alternatively, you can deploy the component directly to Oracle Content Management from Developer Cloud Service using the following command.

cec deploy <component name>

The cec deployAll command will deploy all the components in src/main/components.

Import Components into Developer Cloud Service

If you have a component ZIP file created from the Oracle Content Management server, you can import that into Developer Cloud Service for further development. Use the following command:

cec import-component <location of the component zip file>

Important:

The source code for your components exists in src/main/components. You shouldn't modify any files outside src/main/components because they are needed for the functioning of the Oracle Content Management local server.