Versioning the Repository includes when you wants to manage the your repository items through BCC (Merchandising).
Follow the series of steps to register your repository in BCC.
Step 1: Place the RDF(Repository Defination File) in BCC Module.
Step 2: Place the Component file in BCC Module with following Contents in it.
Path: /my/Library.properties
$class=atg.adapter.gsa.GSARepositoryatg.adapter.version.VersionRepository
$scope=global
repositoryName=Library
# database access- for Publishing Schema, use JTDataSource
dataSource=/atg/dynamo/service/jdbc/SwitchingDataSourceJTDataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
#Add Following two.
versionManager=/atg/epub/version/VersionManagerService
versionItemsByDefault=true
Step 3: Create the Production and Staging Components (Staging not needed, if you have only Production Workflow)
Path: /my/Library_production.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library_production
# database access- use SwitchingDataSource
dataSource=/atg/dynamo/service/jdbc/SwitchingDataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
lockManager=/atg/dynamo/service/ClientLockManager_production
foreignRepositoryMapper=/atg/repository/ProductionRepositoryMapper
Path: /my/Library_staging.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library_staging
# database access- use JTDataSource_staging
dataSource=/atg/dynamo/service/jdbc/JTDataSource_staging
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
lockManager=/atg/dynamo/service/ClientLockManager_staging
Step 4: Override the ContentRepositories component.
/atg/registry/ContentRepositories
Step 5: Add your custom repositories to ContentRepositories component.
Follow the series of steps to register your repository in BCC.
Step 1: Place the RDF(Repository Defination File) in BCC Module.
Step 2: Place the Component file in BCC Module with following Contents in it.
Path: /my/Library.properties
$class=
$scope=global
repositoryName=Library
# database access- for Publishing Schema, use JTDataSource
dataSource=/atg/dynamo/service/jdbc/
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
#Add Following two.
versionManager=/atg/epub/version/VersionManagerService
versionItemsByDefault=true
Step 3: Create the Production and Staging Components (Staging not needed, if you have only Production Workflow)
Path: /my/Library_production.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library_production
# database access- use SwitchingDataSource
dataSource=/atg/dynamo/service/jdbc/SwitchingDataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
lockManager=/atg/dynamo/service/ClientLockManager_production
foreignRepositoryMapper=/atg/repository/ProductionRepositoryMapper
Path: /my/Library_staging.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library_staging
# database access- use JTDataSource_staging
dataSource=/atg/dynamo/service/jdbc/JTDataSource_staging
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
lockManager=/atg/dynamo/service/ClientLockManager_staging
Step 4: Override the ContentRepositories component.
/atg/registry/ContentRepositories
Step 5: Add your custom repositories to ContentRepositories component.
initialRepositories+=/my/Address,\
/my/Library
Hi Iranna,
ReplyDeletewhen explaining about repository in beginners part you have mentioned to use SwitchingDataSource for versioned and JTDataSource for others but here why we are using JTDataSource for making repository versioned?
Thanks
Yes. JTDataSource points to Core schema, which is where versioned items are NOT deployed. But in case of Pub/CA module(instance), JTDataSource will point to PUB/CA schema.
Deletewhat is Production and staging component
ReplyDelete