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, CsvSchema.Builder schemaBuilder, InputStream in, OutputStream out, String... columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Uid
authenticate(String username, String password, OperationOptions options)
Authenticate user on a connector instance.void
close()
Uid
create(ObjectClass objectClass, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Create user, group or any object on a connector instance.void
delete(ObjectClass objectClass, Uid uid, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Delete user, group or any object on a connector instance.void
dispose()
Dispose of any resources associated with connector instance.List<String>
getColumns(CSVPullSpec spec)
ConnInstance
getConnInstance()
Getter for active connector instance.SyncToken
getLatestSyncToken(ObjectClass objectClass)
Read latest sync token from a connector instance.ConnectorObject
getObject(ObjectClass objectClass, Attribute connObjectKey, boolean ignoreCaseMatch, OperationOptions options)
Get remote object.Set<ObjectClassInfo>
getObjectClassInfo()
Builds metadata description of ConnIdObjectClass
.MappingIterator<Map<String,String>>
reader()
SearchResult
search(ObjectClass objectClass, Filter filter, SearchResultsHandler handler, OperationOptions options)
Search for remote objects.void
sync(ObjectClass objectClass, SyncToken token, SyncResultsHandler handler, OperationOptions options)
Sync remote objects from a connector instance.void
test()
Check connection.Uid
update(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.void
validate()
Validate connector instance.SequenceWriter
writer()
-
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, CsvSchema.Builder schemaBuilder, InputStream in, OutputStream out, String... columns)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in 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:Connector
Authenticate user on a connector instance.- Specified by:
authenticate
in 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:Connector
Getter for active connector instance.- Specified by:
getConnInstance
in interfaceConnector
- Returns:
- active connector instance.
-
create
public Uid create(ObjectClass objectClass, Set<Attribute> attrs, OperationOptions options, AtomicReference<Boolean> propagationAttempted)
Description copied from interface:Connector
Create 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:Connector
Update user, group or any object on a connector instance.- Specified by:
update
in 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:Connector
Partial update user, group or any object on a connector instance.- Specified by:
updateDelta
in 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:Connector
Delete 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:Connector
Sync remote objects from a connector instance.
-
getLatestSyncToken
public SyncToken getLatestSyncToken(ObjectClass objectClass)
Description copied from interface:Connector
Read latest sync token from a connector instance.- Specified by:
getLatestSyncToken
in 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:Connector
Get remote object.
-
search
public SearchResult search(ObjectClass objectClass, Filter filter, SearchResultsHandler handler, OperationOptions options)
Description copied from interface:Connector
Search for remote objects.
-
getObjectClassInfo
public Set<ObjectClassInfo> getObjectClassInfo()
Description copied from interface:Connector
Builds metadata description of ConnIdObjectClass
.- Specified by:
getObjectClassInfo
in interfaceConnector
- Returns:
- metadata description of ConnId ObjectClass
-
validate
public void validate()
Description copied from interface:Connector
Validate connector instance.
-
test
public void test()
Description copied from interface:Connector
Check connection.
-
-