001package com.identityworksllc.iiq.common.connector;
002
003import connector.common.DiscoveredApplication;
004import connector.common.statisticscollector.StatisticsCollector;
005import openconnector.ConnectorServices;
006import sailpoint.connector.AuthenticationFailedException;
007import sailpoint.connector.Connector;
008import sailpoint.connector.ConnectorException;
009import sailpoint.connector.ExpiredPasswordException;
010import sailpoint.connector.InsufficientPermissionException;
011import sailpoint.connector.ObjectNotFoundException;
012import sailpoint.object.Application;
013import sailpoint.object.AttributeDefinition;
014import sailpoint.object.Filter;
015import sailpoint.object.Partition;
016import sailpoint.object.ProvisioningPlan;
017import sailpoint.object.ProvisioningResult;
018import sailpoint.object.ResourceObject;
019import sailpoint.object.Schema;
020import sailpoint.tools.CloseableIterator;
021import sailpoint.tools.GeneralException;
022
023import java.util.Iterator;
024import java.util.List;
025import java.util.Map;
026
027/**
028 * A connector implementation that only throws {@link UnsupportedOperationException} for all operations
029 */
030public class UnsupportedConnector implements Connector {
031    @Override
032    public ResourceObject authenticate(String s, String s1) throws ConnectorException, ObjectNotFoundException, AuthenticationFailedException, ExpiredPasswordException {
033        throw new UnsupportedOperationException("Connector operations are not available in this situation");
034    }
035
036    @Override
037    public ResourceObject authenticate(String s, Map<String, Object> map) throws ConnectorException, ObjectNotFoundException, AuthenticationFailedException, ExpiredPasswordException {
038        throw new UnsupportedOperationException("Connector operations are not available in this situation");
039    }
040
041    @Override
042    public ProvisioningResult checkStatus(String s) throws ConnectorException, GeneralException {
043        throw new UnsupportedOperationException("Connector operations are not available in this situation");
044    }
045
046    @Override
047    public void destroy(Map<String, Object> map) throws ConnectorException {
048        throw new UnsupportedOperationException("Connector operations are not available in this situation");
049    }
050
051    @Override
052    public Map<String, Object> discoverApplicationAttributes(Map<String, Object> map) throws ConnectorException {
053        throw new UnsupportedOperationException("Connector operations are not available in this situation");
054    }
055
056    @Override
057    public CloseableIterator<DiscoveredApplication> discoverApplications() throws ConnectorException, UnsupportedOperationException {
058        return null;
059    }
060
061    @Override
062    public Schema discoverSchema(String s, Map<String, Object> map) throws ConnectorException {
063        throw new UnsupportedOperationException("Connector operations are not available in this situation");
064    }
065
066    @Override
067    public Map doHealthCheck(Map<String, Object> map) throws ConnectorException {
068        throw new UnsupportedOperationException("Connector operations are not available in this situation");
069    }
070
071    @Override
072    public Application getApplication() {
073        throw new UnsupportedOperationException("Connector operations are not available in this situation");
074    }
075
076    @Override
077    public Iterator<Map<String, Object>> getChangeLogExtract(Map<String, Object> map) throws ConnectorException {
078        throw new UnsupportedOperationException("Connector operations are not available in this situation");
079    }
080
081    /**
082     * New in 8.4p2
083     *
084     * @param var1 unknown
085     * @return unknown
086     * @throws ConnectorException if the connector cannot be used
087     * @throws ObjectNotFoundException if the object is not found
088     * @throws UnsupportedOperationException if the operation is not supported in this context
089     * @see Connector
090     */
091    @SuppressWarnings({"unused"})
092    public Map<String, Object> getConfigOptions(String var1) throws ConnectorException, ObjectNotFoundException, UnsupportedOperationException {
093        throw new UnsupportedOperationException("Connector operations are not available in this situation");
094    }
095
096    @Override
097    public ConnectorServices getConnectorServices() {
098        throw new UnsupportedOperationException("Connector operations are not available in this situation");
099    }
100
101    @Override
102    public String getConnectorType() {
103        throw new UnsupportedOperationException("Connector operations are not available in this situation");
104    }
105
106    @Override
107    public List<AttributeDefinition> getDefaultAttributes() {
108        throw new UnsupportedOperationException("Connector operations are not available in this situation");
109    }
110
111    @Override
112    public List<Schema> getDefaultSchemas() {
113        throw new UnsupportedOperationException("Connector operations are not available in this situation");
114    }
115
116    @Override
117    public Map<String, Object> getDependencyData() throws ConnectorException {
118        throw new UnsupportedOperationException("Connector operations are not available in this situation");
119    }
120
121    @Override
122    public List<Map<String, Object>> getExtractPartitions(Map<String, Object> map, String s) throws ConnectorException, InsufficientPermissionException {
123        throw new UnsupportedOperationException("Connector operations are not available in this situation");
124    }
125
126    @Override
127    public String getInstance() {
128        throw new UnsupportedOperationException("Connector operations are not available in this situation");
129    }
130
131    @Override
132    public List<Partition> getIteratorPartitions(String s, int i, Filter filter, Map<String, Object> map) throws ConnectorException {
133        throw new UnsupportedOperationException("Connector operations are not available in this situation");
134    }
135
136    @Override
137    public Application getLocalApplication() {
138        throw new UnsupportedOperationException("Connector operations are not available in this situation");
139    }
140
141    @Override
142    public ResourceObject getObject(String s, String s1, Map<String, Object> map) throws ConnectorException {
143        throw new UnsupportedOperationException("Connector operations are not available in this situation");
144    }
145
146    @Override
147    public Application getProxiedApplication(String s, Map<String, Object> map) throws ConnectorException {
148        throw new UnsupportedOperationException("Connector operations are not available in this situation");
149    }
150
151    @Override
152    public Iterator<Map<String, Object>> getSecurityExtract(Map<String, Object> map) throws ConnectorException {
153        throw new UnsupportedOperationException("Connector operations are not available in this situation");
154    }
155
156    @Override
157    public StatisticsCollector getStatisticsCollector() {
158        throw new UnsupportedOperationException("Connector operations are not available in this situation");
159    }
160
161    @Override
162    public List<Application.Feature> getSupportedFeatures() {
163        throw new UnsupportedOperationException("Connector operations are not available in this situation");
164    }
165
166    @Override
167    public String getSystemIdentity() {
168        throw new UnsupportedOperationException("Connector operations are not available in this situation");
169    }
170
171    @Override
172    public Application getTargetApplication() {
173        throw new UnsupportedOperationException("Connector operations are not available in this situation");
174    }
175
176    @Override
177    public String getTargetInstance() {
178        throw new UnsupportedOperationException("Connector operations are not available in this situation");
179    }
180
181    @Override
182    public Iterator<Map<String, Object>> getUtilizationExtract(Map<String, Object> map) throws ConnectorException {
183        throw new UnsupportedOperationException("Connector operations are not available in this situation");
184    }
185
186    @Override
187    public CloseableIterator<ResourceObject> iterateObjects(String s, Filter filter, Map<String, Object> map) throws ConnectorException {
188        throw new UnsupportedOperationException("Connector operations are not available in this situation");
189    }
190
191    @Override
192    public CloseableIterator<ResourceObject> iterateObjects(Partition partition) throws ConnectorException {
193        throw new UnsupportedOperationException("Connector operations are not available in this situation");
194    }
195
196    @Override
197    public ProvisioningResult provision(ProvisioningPlan provisioningPlan) throws ConnectorException, GeneralException {
198        throw new UnsupportedOperationException("Connector operations are not available in this situation");
199    }
200
201    @Override
202    public void setApplication(Application application) {
203        throw new UnsupportedOperationException("Connector operations are not available in this situation");
204    }
205
206    @Override
207    public void setConnectorServices(ConnectorServices connectorServices) {
208        throw new UnsupportedOperationException("Connector operations are not available in this situation");
209    }
210
211    @Override
212    public void setInstance(String s) {
213        throw new UnsupportedOperationException("Connector operations are not available in this situation");
214    }
215
216    @Override
217    public void setStatisticsCollector(StatisticsCollector statisticsCollector) {
218        throw new UnsupportedOperationException("Connector operations are not available in this situation");
219    }
220
221    @Override
222    public void setSystemIdentity(String s) {
223        throw new UnsupportedOperationException("Connector operations are not available in this situation");
224    }
225
226    @Override
227    public void setTargetApplication(Application application) {
228        throw new UnsupportedOperationException("Connector operations are not available in this situation");
229    }
230
231    @Override
232    public void setTargetInstance(String s) {
233        throw new UnsupportedOperationException("Connector operations are not available in this situation");
234    }
235
236    @Override
237    public boolean supportsPartitionedDeltaAggregation() {
238        throw new UnsupportedOperationException("Connector operations are not available in this situation");
239    }
240
241    @Override
242    public void testConfiguration() throws ConnectorException {
243        throw new UnsupportedOperationException("Connector operations are not available in this situation");
244    }
245
246    @Override
247    public void updateApplicationConfig() throws GeneralException {
248        throw new UnsupportedOperationException("Connector operations are not available in this situation");
249    }
250
251}