Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ContextBoService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 1.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl1.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.krms.impl.repository; | |
17 | ||
18 | ||
19 | import org.kuali.rice.krms.api.repository.action.ActionDefinition; | |
20 | import org.kuali.rice.krms.api.repository.context.ContextDefinition; | |
21 | import org.kuali.rice.krms.api.repository.context.ContextDefinition; | |
22 | ||
23 | /** | |
24 | * This is the interface for accessing KRMS repository Context related bos | |
25 | * | |
26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
27 | * | |
28 | */ | |
29 | public interface ContextBoService { | |
30 | ||
31 | /** | |
32 | * This will create a {@link ContextDefinition} exactly like the parameter passed in. | |
33 | * | |
34 | * @param context The Context to create | |
35 | * @throws IllegalArgumentException if the context is null | |
36 | * @throws IllegalStateException if the context already exists in the system | |
37 | */ | |
38 | public ContextDefinition createContext(ContextDefinition context); | |
39 | ||
40 | /** | |
41 | * This will update an existing {@link ContextDefinition}. | |
42 | * | |
43 | * @param context The Context to update | |
44 | * @throws IllegalArgumentException if the Context is null | |
45 | * @throws IllegalStateException if the Context does not exists in the system | |
46 | */ | |
47 | public void updateContext(ContextDefinition context); | |
48 | ||
49 | // public void createContextAttribute(ContextAttribute contextAttribute); | |
50 | // public void updateContextAttribute(ContextAttribute contextAttribute); | |
51 | ||
52 | /** | |
53 | * Retrieves an Context from the repository based on the given context id. | |
54 | * | |
55 | * @param contextId the id of the Context to retrieve | |
56 | * @return an {@link ContextDefinition} identified by the given contextId. | |
57 | * A null reference is returned if an invalid or non-existent id is supplied. | |
58 | * @throws IllegalArgumentException if the contextId is null or blank. | |
59 | */ | |
60 | public ContextDefinition getContextByContextId( String contextId ); | |
61 | ||
62 | /** | |
63 | * Retrieves an Context from the repository based on the provided context name | |
64 | * and namespace. | |
65 | * | |
66 | * @param name the name of the Context to retrieve. | |
67 | * @param namespace the namespace that the context is under. | |
68 | * @return an {@link ContextDefinition} identified by the given name and namespace. | |
69 | * A null reference is returned if an invalid or non-existent name and | |
70 | * namespace combination is supplied. | |
71 | * @throws IllegalArgumentException if the either the name or the namespace | |
72 | * is null or blank. | |
73 | */ | |
74 | public ContextDefinition getContextByNameAndNamespace( String name, String namespace ); | |
75 | ||
76 | /** | |
77 | * Converts a mutable bo to it's immutable counterpart | |
78 | * @param bo the mutable business object | |
79 | * @return the immutable object | |
80 | */ | |
81 | // public ContextDefinition to( ContextBo bo); | |
82 | ||
83 | /** | |
84 | * Converts a immutable object to it's mutable bo counterpart | |
85 | * @param im immutable object | |
86 | * @return the mutable bo | |
87 | */ | |
88 | // public ContextBo from( ContextDefinition im ); | |
89 | } |