2 * This is a common dao with basic CRUD operations and is not limited to any
3 * persistent layer implementation
5 * Copyright (C) 2008 Imran M Yousuf (imyousuf@smartitengineering.com)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 3 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 package com
.smartitengineering
.domain
.exim
;
21 import java
.io
.IOException
;
22 import java
.io
.InputStream
;
25 * As the name suggests the API indicates that a domain is able to import itself
26 * and to determine for which MIME types it can it has an operation dedicated op
31 public interface DomainSelfImporter
{
34 * It provides the operation for clients to determine whether the domain is
35 * able to import itself to the MIME type the client wants.
36 * @param mimeType Type to import from
37 * @return True if and only if the mimeType is supported for import
39 public boolean isMIMESupported(String mimeType
);
42 * Imports the domain from the specified stream in specified type
43 * @param mimeType Type to import from.
44 * @param outputStream Stream to import from.
45 * @throws IllegalArgumentException If either argument is null or MIME type
47 * @throws IOException If any error occurrs while writing to stream.
49 public void importObject(String mimeType
,
50 InputStream inputStream
)
51 throws IllegalArgumentException
,