In pipeline, I need to get channel domain to which current application is assigned.
I get current ApplicationBO instance but I haven't been able to get channel domain from it (I tried inspecting it in debugger, but I can only get domain for the application but not for the channel).
This is how currently applications and channels are assigned:
Company organization:
Both applications share the common cartridge which contains pipeline in which I need to get current channel
There are two options:
DetermineRepositories-Channel
which returns you a Repository object (that is the Channel). On the Repository use object path Repository:RepositoryDomain
to get the Domain. I'm not sure how big the performance implication is though..ApplicationBO:Extension("PersistentObjectBOExtension"):PersistentObject:Domain
to get the owning domain of the application itself. That will always be the channel(Domain). Because that's where storefront applications are born.In case you need to convert the Domain object to a Repository object you can use pipelet GetRepositoryByRepositoryDomain
.