View Javadoc
1 /* 2 * Copyright (c) 2003 3 * Information Desire GmbH 4 * All rights reserved. 5 */ 6 package com.infodesire.infobit.external; 7 8 import com.infodesire.infobit.InfobitException; 9 import com.infodesire.infobit.InfobitManager; 10 import com.infodesire.infobit.InfobitSecurityException; 11 12 import com.infodesire.infobit.data.Acl; 13 14 import java.io.Reader; 15 16 import java.util.List; 17 18 /*** 19 * Defines the protocol to recover a collection of infobits from the XML 20 * representation generated by {@link InfobitExporter} back to infobits. 21 * 22 * @author peter2 23 * @created August 28, 2003 24 * @version $Revision: 1.1 $ 25 */ 26 public interface InfobitImporter { 27 28 /*** 29 * Defines the manager to work with. 30 * 31 * @param manager The manager to access infobits 32 */ 33 void setManager(InfobitManager manager); 34 35 36 /*** 37 * Gets the manager to work with. 38 * 39 * @return The manager to access infobits 40 */ 41 InfobitManager getManager(); 42 43 44 /*** 45 * Defines the ACL used to create imported infobits and content 46 * 47 * @param acl The new Acl value 48 */ 49 public void setAcl(Acl acl); 50 51 52 /*** 53 * Prepares the instance to be used. 54 * 55 * @exception InfobitException Description of Exception 56 */ 57 void init() throws InfobitException; 58 59 60 /*** 61 * Recovers infobits from an XML representation as created by {@link 62 * InfobitExporter#export InfobitExporter.export}. The infobits to be 63 * importer are subjected to the following constraints: 64 * <ul> 65 * <li> Versions and infobits must not form circular dependencies 66 * <li> Infobits already existing in the data store (identified by name) 67 * must not be imported 68 * <li> Infobits referenced as templates of script versions or as link 69 * targets must either be imported or already exist in the data store. 70 * 71 * <li> The common constraints on unique version and infobit names apply. 72 * 73 * </ul> 74 * 75 * 76 * @param input Source from which to obtain the XML 77 * document representing the infobits to import 78 * @param path System location of <code>input</code> 79 * , used in diagnostic messages 80 * @param diagnostics A list to be filled with {@link 81 * ImportMessage} instances providing diagnostic messages about errors 82 * encountered during the import. 83 * @return A collection of the imported 84 * infobits. 85 * @exception InfobitException Generic processing error 86 * @exception InfobitSecurityException Description of Exception 87 */ 88 List importInfobits(Reader input, String path, List diagnostics) 89 throws InfobitException, InfobitSecurityException; 90 91 }

This page was automatically generated by Maven