Class CSVStreamConnector
- java.lang.Object
-
- org.apache.syncope.core.provisioning.java.pushpull.stream.CSVStreamConnector
-
- All Implemented Interfaces:
AutoCloseable,Connector
public class CSVStreamConnector extends Object implements Connector, AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description CSVStreamConnector(String keyColumn, String arrayElementsSeparator, com.fasterxml.jackson.dataformat.csv.CsvSchema.Builder schemaBuilder, InputStream in, OutputStream out, String... columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Uidauthenticate(String username, String password, OperationOptions options)Authenticate user on a connector instance.voidclose()Uidcreate(ObjectClass objectClass, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)Create user, group or any object on a connector instance.voiddelete(ObjectClass objectClass, Uid uid, OperationOptions options, AtomicReference<Boolean> propagationAttempted)Delete user, group or any object on a connector instance.voiddispose()Dispose of any resources associated with connector instance.List<String>getColumns(CSVPullSpec spec)ConnInstancegetConnInstance()Getter for active connector instance.SyncTokengetLatestSyncToken(ObjectClass objectClass)Read latest sync token from a connector instance.ConnectorObjectgetObject(ObjectClass objectClass, Attribute connObjectKey, boolean ignoreCaseMatch, OperationOptions options)Get remote object.Set<ObjectClassInfo>getObjectClassInfo()Builds metadata description of ConnIdObjectClass.MappingIterator<Map<String,String>>reader()SearchResultsearch(ObjectClass objectClass, Filter filter, SearchResultsHandler handler, OperationOptions options)Search for remote objects.voidsync(ObjectClass objectClass, SyncToken token, SyncResultsHandler handler, OperationOptions options)Sync remote objects from a connector instance.voidtest()Check connection.Uidupdate(ObjectClass objectClass, Uid uid, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)Update user, group or any object on a connector instance.Set<AttributeDelta>updateDelta(ObjectClass objectClass, Uid uid, Set<AttributeDelta> modifications, OperationOptions options, AtomicReference<Boolean> propagationAttempted)Partial update user, group or any object on a connector instance.voidvalidate()Validate connector instance.SequenceWriterwriter()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.syncope.core.provisioning.api.Connector
filteredReconciliation, fullReconciliation, search
-
-
-
-
Constructor Detail
-
CSVStreamConnector
public CSVStreamConnector(String keyColumn, String arrayElementsSeparator, com.fasterxml.jackson.dataformat.csv.CsvSchema.Builder schemaBuilder, InputStream in, OutputStream out, String... columns)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
reader
public MappingIterator<Map<String,String>> reader() throws IOException
- Throws:
IOException
-
getColumns
public List<String> getColumns(CSVPullSpec spec) throws IOException
- Throws:
IOException
-
writer
public SequenceWriter writer() throws IOException
- Throws:
IOException
-
authenticate
public Uid authenticate(String username, String password, OperationOptions options)
Description copied from interface:ConnectorAuthenticate user on a connector instance.- Specified by:
authenticatein interfaceConnector- Parameters:
username- the name based credential for authenticationpassword- the password based credential for authenticationoptions- ConnId's OperationOptions- Returns:
- Uid of the account that was used to authenticate
-
getConnInstance
public ConnInstance getConnInstance()
Description copied from interface:ConnectorGetter for active connector instance.- Specified by:
getConnInstancein interfaceConnector- Returns:
- active connector instance.
-
create
public Uid create(ObjectClass objectClass, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Description copied from interface:ConnectorCreate user, group or any object on a connector instance.
-
update
public Uid update(ObjectClass objectClass, Uid uid, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Description copied from interface:ConnectorUpdate user, group or any object on a connector instance.- Specified by:
updatein interfaceConnector- Parameters:
objectClass- ConnId's object classuid- remote identifierattrs- attributes for updateoptions- ConnId's OperationOptionspropagationAttempted- if creation is actually performed (based on connector instance's capabilities)- Returns:
- Uid for updated object
-
updateDelta
public Set<AttributeDelta> updateDelta(ObjectClass objectClass, Uid uid, Set<AttributeDelta> modifications, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Description copied from interface:ConnectorPartial update user, group or any object on a connector instance.- Specified by:
updateDeltain interfaceConnector- Parameters:
objectClass- ConnId's object classuid- remote identifiermodifications- attribute modifications to applyoptions- ConnId's OperationOptionspropagationAttempted- if creation is actually performed (based on connector instance's capabilities)- Returns:
- the applied modifications
-
delete
public void delete(ObjectClass objectClass, Uid uid, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Description copied from interface:ConnectorDelete user, group or any object on a connector instance.
-
sync
public void sync(ObjectClass objectClass, SyncToken token, SyncResultsHandler handler, OperationOptions options)
Description copied from interface:ConnectorSync remote objects from a connector instance.
-
getLatestSyncToken
public SyncToken getLatestSyncToken(ObjectClass objectClass)
Description copied from interface:ConnectorRead latest sync token from a connector instance.- Specified by:
getLatestSyncTokenin interfaceConnector- Parameters:
objectClass- ConnId's object class.- Returns:
- latest sync token
-
getObject
public ConnectorObject getObject(ObjectClass objectClass, Attribute connObjectKey, boolean ignoreCaseMatch, OperationOptions options)
Description copied from interface:ConnectorGet remote object.
-
search
public SearchResult search(ObjectClass objectClass, Filter filter, SearchResultsHandler handler, OperationOptions options)
Description copied from interface:ConnectorSearch for remote objects.
-
getObjectClassInfo
public Set<ObjectClassInfo> getObjectClassInfo()
Description copied from interface:ConnectorBuilds metadata description of ConnIdObjectClass.- Specified by:
getObjectClassInfoin interfaceConnector- Returns:
- metadata description of ConnId ObjectClass
-
validate
public void validate()
Description copied from interface:ConnectorValidate connector instance.
-
test
public void test()
Description copied from interface:ConnectorCheck connection.
-
-