KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > examples > annotations > panorama > PanoramaDiscussionsModule


1 // Copyright 2007 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.examples.annotations.panorama;
16
17 import java.util.List JavaDoc;
18
19 import org.apache.examples.panorama.discussions.DiscussionsStartup;
20 import org.apache.examples.panorama.startup.impl.ExecuteStatic;
21 import org.apache.examples.panorama.startup.impl.Task;
22 import org.apache.hivemind.annotations.AbstractAnnotatedModule;
23 import org.apache.hivemind.annotations.definition.Contribution;
24
25 public class PanoramaDiscussionsModule extends AbstractAnnotatedModule
26 {
27     @Contribution( configurationId="panorama.startup.tasks" )
28     public void contributeTaks(List JavaDoc<Task> tasks)
29     {
30         Task discussionStartupTask = new Task();
31         ExecuteStatic executable = new ExecuteStatic();
32         executable.setTargetClass(DiscussionsStartup.class);
33         discussionStartupTask.setExecutable(executable);
34         discussionStartupTask.setId("discussions");
35         discussionStartupTask.setTitle("Discussions");
36         
37         tasks.add(discussionStartupTask);
38     }
39 }
40
Popular Tags