01: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
02: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
03: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
04: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
05: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
06: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
07: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
08: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
09: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
10: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
11: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
12: // POSSIBILITY OF SUCH DAMAGE.
13: //
14: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
15: package com.metaboss.sdlctools.domains.enterprisemodel.storage.xmlfileimpl;
16:
17: import com.metaboss.enterprise.ps.PSException;
18: import com.metaboss.sdlctools.domains.enterprisemodel.storage.PSDomain;
19: import com.metaboss.sdlctools.domains.enterprisemodel.storage.STDomain;
20: import com.metaboss.sdlctools.domains.enterprisemodel.storage.xmlfileimpl.dom.DomainDefType;
21:
22: public class PSDomainImpl implements PSDomain {
23: /** Returns details corresponding to given reference or null struct if definition not found */
24: public STDomain getDomain(String pDomainRef) throws PSException {
25: DomainDefType lDomainDef = Storage.getDomain(pDomainRef);
26: if (lDomainDef == null)
27: return null;
28: STDomain lStruct = new STDomain();
29: lStruct.DomainRef = lDomainDef.getDomainRef();
30: lStruct.Description = lDomainDef.getDescription();
31: lStruct.Version = Util
32: .getVersion(lDomainDef.getVersionNumber());
33: return lStruct;
34: }
35:
36: /* Returns list of domain references for enterprise */
37: public String[] getAllEntityRefs(String pDomainRef)
38: throws PSException {
39: return Storage.getDomainEntityRefs(pDomainRef);
40: }
41:
42: /* Returns list of all associations defined in this domain */
43: public String[] getAllAssociationRefs(String pDomainRef)
44: throws PSException {
45: return Storage.getDomainAssociationRefs(pDomainRef);
46: }
47:
48: /* Returns list of references of all reports defined in this domain */
49: public String[] getAllReportRefs(String pDomainRef)
50: throws PSException {
51: return Storage.getDomainReportRefs(pDomainRef);
52: }
53: }
|