You are on page 1of 29

BCC Training Day 3

Agenda

 Introducing New Repository into BCC


 Simple BCC UI Customizations
 Customizing Workflows
 User Roles
 Exporting and Importing data
 View Mappings

2
Introducing New Repository into BCC
eStore Side Configurations
 com/repositories/shipping/ShippingRepository.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
dataSource=/atg/dynamo/service/jdbc/JTDataSource
definitionFiles=/com/repositories/shipping/shippingRepository.xml
idGenerator=/atg/dynamo/service/IdGenerator
transactionManager=/atg/dynamo/transaction/TransactionManager
repositoryName=ShippingRepository
lockManager=/atg/dynamo/service/ClientLockManager

 com\repositories\shipping\shippingRepository.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE gsa-template PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
"http://www.atg.com/dtds/gsa/gsa_1.0.dtd">
<gsa-template>
<header>
<name>Shipping Repository</name>
</header>
<item-descriptor name="courier" display-name="courier" display-property="courierCode" >
<table name="courier" type="primary" id-column-name="id">
<property name="name" column-name="courier_name" data-type="string">
</property>
<property name="courierCode" column-name="courier_code" data-type="string" >
</property>
<property name="rut" column-name="rut" data-type="string" >
</property>
</table>
</item-descriptor>
</gsa-template>
Publishing Side Configurations

 com/repositories/shipping/ShippingRepository.properties
$class=atg.adapter.version.VersionRepository
versionManager=/atg/epub/version/VersionManagerService
versionItemsByDefault=true
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
dataSource=/atg/dynamo/service/jdbc/JTDataSource
definitionFiles=/com/repositories/shipping/shippingRepository.xml
idGenerator=/atg/dynamo/service/IdGenerator
transactionManager=/atg/dynamo/transaction/TransactionManager
repositoryName=ShippingRepository
lockManager=/atg/dynamo/service/ClientLockManager

 com/repositories/shipping/ShippingRepository_production.properties
$class=atg.adapter.gsa.GSARepository
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
dataSource=/atg/dynamo/service/jdbc/JTDataSource_production
definitionFiles=/com/repositories/shipping/shippingRepository.xml
idGenerator=/atg/dynamo/service/IdGenerator
transactionManager=/atg/dynamo/transaction/TransactionManager
repositoryName=ShippingRepository_production
Generation of SQL Scripts
 startSQLRepository -m merch -repository
com/repositories/shipping/ShippingRepository -database
oracle –output SQLFile
C:\BCCTrainingATG10\shipping_version.sql
 startSQLRepository -m estore -repository
com/repositories/shipping/ShippingRepository -database
oracle -outputSQLFile C:\BCCTrainingATG10\shipping.sql
Production Scripts (Execute in Core)
CREATE TABLE courier (
id varchar2(254) NOT NULL,
courier_name varchar2(254) NULL,
courier_code varchar2(254) NULL,
rut varchar2(254) NULL,
PRIMARY KEY(id)
);
Publishing Scripts (Execute in publishing)
CREATE TABLE courier (
id varchar2(254) NOT NULL,
asset_version INTEGER NOT NULL,
courier_name varchar2(254) NULL,
courier_code varchar2(254) NULL,
rut varchar2(254) NULL,
version_deleted number(1) NULL,
version_editable number(1) NULL,
pred_version INTEGER NULL,
workspace_id varchar2(254) NULL,
branch_id varchar2(254) NULL,
is_head number(1) NULL,
checkin_date DATE NULL,
CHECK (version_deleted IN (0, 1)),
CHECK (version_editable IN (0, 1)),
CHECK (is_head IN (0, 1)),
PRIMARY KEY(id, asset_version)
);
eStore Side Configurations
 atg/registry/ContentRepositories.properties
initialRepositories+=/com/repositories/shipping/ShippingRep
ository
Publishing Side Configurations
 \atg\epub\version\VersionManagerService.properties
versionedRepositories+=\
ShippingRepository\=/com/repositories/shipping/ShippingRepository

 \atg\registry\ContentRepositories.properties
initialRepositories+=/com/repositories/shipping/ShippingRepository_prod
uction
Publishing Side Configurations
How to publish content with new repository
Few Simple Customizations in BCC
 <attribute name=“deployable” value="false"/>
 <attribute name="uiwritable" value="false"/>
 <attribute name="propertySortPriority" value=“-12" />
New Custom Action in Workflows
 Create A new class which extends
atg.epub.workflow.process.action.PublishingAction

 Create a component for that class


 Make the necessary entries with <action> tag.
atg/epub/workflow/process/workflowProcessManager.xml
New Custom Condition in Workflows
 Create A new class which extends atg.process.filter.ExpressionFilter
 Create a component for that class
 Make the necessary entries with< condition > tag.
atg/epub/workflow/process/workflowProcessManager.xml
User Roles

Role Intended for...


EPub-User Users who create and manage assets
Users who perform activities such as reviewing and approving
EPub-Manager content created by an EPub-User. An EPub-Manager can also
deploy assets to production targets.
Users who require administrative privileges—for example, to
EPub-Admin configure the ATG Business Control Center or modify user access
rights.
EPub-Super-Admin Users who require full access to the PublishingRepository.
EPub-User
 User can only create/modify the assets. Only in author stage
or Verify deployment stage.
Exporting and Importing data
 Two sets of commands to do import/export
– export/importRepository
– startSQLRepository
Exporting and Importing data

 exportRepository
• exportRepository exports the contents of one or more standard repositories to a
.jar data file.
• Exported from production site

Syntax
\bin> exportRepository –m Catalog –file users/joe/CatalogExport.jar

–r /myApp/Catalog
Exporting and Importing data

 importRepository
• The importRepository script imports the contents of the data file created by
exportRepository into the versioned repositories

Syntax
 importRepository –m CatalogVer –file /users/joe/CatalogExport.jar –workspace
initialcheckin
Exporting and Importing data
 Export using startSQLRepository
– Can be exported from production environment and imported to publishing
environment.

Export Command

Export All repositories

bin/startSQLRepository -m module –exportRepositories all output-file

Export from one Repository

bin/startSQLRepository -m module -export all output-file -repository repository-path


 Import using startSQLRepository
Importing Repository Data
startSQLRepository -m module -import input-file
-repository repository-path
Importing to A Versioned Repository
startSQLRepository –m module -s [server-name] -import
input-file -repository path -project name [-workflow name] –
user username –comment text -workspace name –comment
text
View Mappings
 The Business Control Center uses the View Mapping system
to display assets and asset properties
 The View Mapping system is an object-based framework of
dynamically generated pages, which are created at runtime
according to the configuration in the View Mapping
repository.
View Mappings

 View Mapping Repository


– itemMapping
– itemViewMapping
– itemView
– propertyViewMapping
– propertyView
– Map Modes
– View Mapping Form Handlers
itemMapping
 itemPath
– The Nucleus path of the component that represents the asset’s repository.

 itemName
– The repository item descriptor name .

 mode
– The map mode to use for this mapping. For example browse, conflict, diff, edit, pick, view

 formHandler
– A reference to a View Mapping formHandler item used to handle input of asset properties

 viewMappings
– A list of itemViewMapping references.

<add-item item-descriptor="itemMapping" id="SiteTextContentIM">


<set-property name="formHandler"><![CDATA[1]]></set-property>
<set-property name="viewMappings"><![CDATA[SiteTextContentIVM]]></set-property>
<set-property name="itemName"><![CDATA[siteTextContent]]></set-property>
<set-property name="description"><![CDATA[siteTextContent mapping]]></set-property>
<set-property name="name"><![CDATA[*]]></set-property>
<set-property name="mode"><![CDATA[2]]></set-property>
<set-property name="isReadOnly"><![CDATA[true]]></set-property>
<set-property name="itemPath"><![CDATA[/com/dys/repositories/content/ContentRepository]]></set-
property>
</add-item>
itemViewMapping
 displayName
 The display name for the view in the Business Control Center
 description
 Optional description of this item.
 name
 The name for the view in the ACC
 view
 Reference to an itemView
 propertyMappings
 A map of asset properties to propertyViewMappings

<add-item item-descriptor="itemViewMapping" id="SiteTextContentIVM">


<set-property name="displayName"><![CDATA[siteTextContent]]></set-property>
<set-property name="description"><![CDATA[siteTextContent View Mapping]]></set-property>
<set-property name="name"><![CDATA[siteTextContent]]></set-property>
<set-property name="view"><![CDATA[2]]></set-property>
<set-property
name="propertyMappings"><![CDATA[value_en=DYSStringPVM,value_es=DYSStringPVM,value=DYSStringPV
M]]></set-property>
</add-item>
propertyView
 Type - The data type to which this view applies.
 Uri - The URI of the JSP that renders this view.
 isDefault - A boolean property, where true specifies to use this view as the default for this property, when in the
specified mode.

 isReadOnly - A boolean property, where true specifies to disallow editing of this view.
 isComponentPropertyView - A boolean property, where true specifies this view is used for a component
property (component of a collection).

 Attributes - Optional key/value pairs that define an attribute of this propertyView.

<add-item item-descriptor="propertyView" id="DYSStringPV">


<set-property name="name"><![CDATA[DYS - Big String]]></set-property>
<set-property name="description"><![CDATA[DYS - Big String Custom Property]]></set-property>
<set-property name="mode"><![CDATA[2]]></set-property>
<set-property name="type"><![CDATA[string]]></set-property>
<set-property name="applicationName"><![CDATA[Publishing Portlets]]></set-property>
<set-property name="uri"><![CDATA[/html/views/property/bigstring/textAreaEdit.jsp]]></set-property>
<set-property name="isComponentPropertyView"><![CDATA[false]]></set-property>
<set-property name="isDefault"><![CDATA[false]]></set-property>
<set-property
name="attributes"><![CDATA[defaultValue=1100,textAboveField=1102,title=1101,labelBeforeField=1104,text
BelowField=1103,labelAfterField=1105,inputFieldSize=1106,spellCheck=1108]></set-property>
</add-item>
Sample View Mapping
<add-item item-descriptor="propertyView" id="DYSStringPV">
<set-property name="name"><![CDATA[DYS - Big String]]></set-property>
<set-property name="description"><![CDATA[DYS - Big String Custom Property]]></set-property>
<set-property name="mode"><![CDATA[2]]></set-property>
<set-property name="type"><![CDATA[string]]></set-property>
<set-property name="applicationName"><![CDATA[Publishing Portlets]]></set-property>
<set-property name="uri"><![CDATA[/html/views/property/bigstring/textAreaEdit.jsp]]></set-property>
<set-property name="isComponentPropertyView"><![CDATA[false]]></set-property>
<set-property name="isDefault"><![CDATA[false]]></set-property>
<set-property name="attributes"><![CDATA[defaultValue=1100,textAboveField=1102,title=1101,labelBeforeField=1104,
textBelowField=1103,labelAfterField=1105,inputFieldSize=1106,spellCheck=1108]]></set-property>
</add-item>

<add-item item-descriptor="propertyViewMapping" id="DYSStringPVM">


<set-property name="propertyView"><![CDATA[DYSStringPV]]></set-property>
<set-property name="description"><![CDATA[DYSStringPVM - Big String Customization]]></set-property>
</add-item>

<add-item item-descriptor="itemViewMapping" id="SiteTextContentIVM">


<set-property name="displayName"><![CDATA[siteTextContent]]></set-property>
<set-property name="description"><![CDATA[siteTextContent View Mapping]]></set-property>
<set-property name="name"><![CDATA[siteTextContent]]></set-property>
<set-property name="view"><![CDATA[2]]></set-property>
<set-property name="propertyMappings"><![CDATA[value_en=DYSStringPVM,value_es=DYSStringPVM,value=DYSStringPVM]]></set-property>
</add-item>

<add-item item-descriptor="itemMapping" id="SiteTextContentIM">


<set-property name="formHandler"><![CDATA[1]]></set-property>
<set-property name="viewMappings"><![CDATA[SiteTextContentIVM]]></set-property>
<set-property name="itemName"><![CDATA[siteTextContent]]></set-property>
<set-property name="description"><![CDATA[siteTextContent mapping]]></set-property>
<set-property name="name"><![CDATA[*]]></set-property>
<set-property name="mode"><![CDATA[2]]></set-property>
<set-property name="isReadOnly"><![CDATA[true]]></set-property>
<set-property name="itemPath"><![CDATA[/com/dys/repositories/content/ContentRepository]]></set-property>
</add-item>

You might also like