[ 
http://opencast.jira.com/browse/MH-7863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27417#comment-27417
 ] 

Josh Holtzman edited comment on MH-7863 at 6/25/11 2:06 PM:
------------------------------------------------------------

Do not try to use the low-level OSGI APIs from within your Java code, since 
you'd then need to deal with all of the dynamism of the OSGI environment.  
Instead, use the OSGI declarative services feature to do dependency injection.

YouTubeDistributionService should include a reference to WorkflowService and a 
setter: protected void setWorkflowService(WorkflowService workflowService) 
{this.workflowService=workflowService;}.  It is not your job to call this 
setter, it will be called for you.

In the service registration 
(src/main/resources/OSGI-INF/distribution-service-youtube.xml), you'll need to 
add a reference to the workflow service:

<reference name="WORKFLOW" 
interface="org.opencastproject.workflow.api.WorkflowService" cardinality="1..1" 
policy="static" bind="setWorkflowService"/>

These inter-service references are all over the place, in almost every service 
in Matterhorn, so pick any OSGI-INF folder to find examples.

      was (Author: jholtzman):
    YouTubeDistributionService should include a reference to WorkflowService 
and a setter: protected void setWorkflowService(WorkflowService 
workflowService) {this.workflowService=workflowService;}

In the service registration 
(src/main/resources/OSGI-INF/distribution-service-youtube.xml), you'll need to 
add a reference to the workflow service:

<reference name="WORKFLOW" 
interface="org.opencastproject.workflow.api.WorkflowService" cardinality="1..1" 
policy="static" bind="setWorkflowService"/>

These inter-service references are all over the place, in almost every service 
in Matterhorn, so pick any OSGI-INF folder to find examples.
  
> Create Implementation for YoutubeDistributionContextStrategy Using Old API
> --------------------------------------------------------------------------
>
>                 Key: MH-7863
>                 URL: http://opencast.jira.com/browse/MH-7863
>             Project: Matterhorn Project
>          Issue Type: Sub-Task
>          Components: Architecture & Services
>    Affects Versions: None
>            Reporter: Adam Hochman
>            Assignee: Kristofor Amundson
>             Fix For: None
>
>
> uses workflow to access media package.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to