View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.oodt.cas.catalog.server.channel.rmi;
18  
19  //JDK imports
20  import java.rmi.Remote;
21  import java.rmi.RemoteException;
22  import java.util.List;
23  import java.util.Properties;
24  import java.util.Set;
25  
26  //OODT imports
27  import org.apache.oodt.cas.catalog.mapping.IngestMapper;
28  import org.apache.oodt.cas.catalog.metadata.TransactionalMetadata;
29  import org.apache.oodt.cas.catalog.page.QueryPager;
30  import org.apache.oodt.cas.catalog.query.QueryExpression;
31  import org.apache.oodt.cas.catalog.repository.CatalogRepository;
32  import org.apache.oodt.cas.catalog.struct.TransactionId;
33  import org.apache.oodt.cas.catalog.system.Catalog;
34  import org.apache.oodt.cas.metadata.Metadata;
35  
36  /**
37   * 
38   * @author bfoster
39   * @version $Revision$
40   *
41   */
42  public interface RmiCommunicationChannelClientInterface extends Remote {
43  	
44  	public void setCatalogRepository(CatalogRepository catalogRepository);
45  	
46  	public CatalogRepository getCatalogRepository() throws Exception;
47  	
48  	public IngestMapper getIngestMapper() throws RemoteException;
49  
50  	public void setIngestMapper(IngestMapper ingestMapper) throws RemoteException;
51  
52  	public boolean isRestrictQueryPermissions() throws RemoteException;
53  
54  	public void setRestrictQueryPermissions(boolean restrictQueryPermissions) throws RemoteException;
55  
56  	public boolean isHasIngestPermissions() throws RemoteException;
57  
58  	public void setHasIngestPermissions(boolean restrictIngestPermissions) throws RemoteException;
59  
60  	public Class<? extends TransactionId<?>> getTransactionIdClass() throws RemoteException;
61  
62  	public void setTransactionIdClass(Class<? extends TransactionId<?>> transactionIdClass) throws RemoteException;
63  
64  	public void addCatalog(Catalog catalog) throws RemoteException;
65  	
66  	public void addCatalog(Catalog catalog, boolean allowOverride) throws RemoteException;
67  	
68  	public void removeCatalog(String catalogUrn) throws RemoteException;
69  
70  	public void removeCatalog(String catalogUrn, boolean preserveMapping) throws RemoteException;
71  
72  	public Set<Catalog> getCurrentCatalogList() throws RemoteException;
73  	
74  	public Catalog getCatalog(String catalogUrn) throws RemoteException;
75  
76  	public Set<String> getCurrentCatalogIds() throws RemoteException;
77  		
78  	public TransactionId<?> ingest(Metadata metadata) throws RemoteException;
79  	
80  	public void delete(Metadata metadata) throws RemoteException;
81  	
82  	public List<String> getProperty(String key) throws RemoteException;
83  
84  	public Properties getCalalogProperties() throws RemoteException;
85  	
86  	public Properties getCalalogProperties(String catalogUrn) throws RemoteException;
87  	
88  	public QueryPager query(QueryExpression queryExpression) throws RemoteException;
89  	
90  	public QueryPager query(QueryExpression queryExpression, boolean sortResults) throws RemoteException;
91   
92  	public Set<TransactionalMetadata> getNextPage(QueryPager queryPager) throws RemoteException;
93  
94  	public Set<TransactionId<?>> getTransactionIdsForAllPages(QueryPager queryPager) throws RemoteException;
95  	
96  	public Set<TransactionalMetadata> getAllPages(QueryPager queryPager) throws RemoteException;
97  	
98  	public Set<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings) throws RemoteException;
99  	
100 	public Set<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds) throws RemoteException;
101 	
102 	public Set<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds, String catalogUrn) throws RemoteException;
103 	
104 	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn) throws RemoteException;
105 	
106 	public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogUrn, boolean generateNew) throws RemoteException;
107 }