Import entities from Source Control - Java Extension SDK
Hi,
i'm trying to build a Thingworx Extension service who has to Export and Import entities from a Source Control thing.
I've already built the "Export", invoking SourceControlFunctions resource and its ExportSourceControlledEntities service.
@ThingworxServiceDefinition(name = "ExportEntitiesToFileRepository", description = "Esporta le entities di una collection/project nel path specificato della thing File Repository indicata nella configurazione.\r\nNON ESEGUE NESSUNA ATTIVITA' di source control", category = "", isAllowOverride = false, aspects = {
"isAsync:false" })
@ThingworxServiceResult(name = "Result", description = "", baseType = "BOOLEAN", aspects = {})
public Boolean ExportEntitiesToFileRepository() {
String repositoryThingName = getStringConfigurationSetting("Configuration", "repository_thing");
_logger.error("Repository Thing: "+repositoryThingName);
SourceControlFunctions scf = (SourceControlFunctions) EntityUtilities.findEntity("SourceControlFunctions", ThingworxRelationshipTypes.Resource);
try {
Thing fsThing = (Thing)EntityUtilities.findEntity(repositoryThingName, ThingworxRelationshipTypes.Thing);
if(fsThing != null) {
scf.ExportSourceControlledEntities(repositoryThingName, null, "Things", null, null, null, null, false);
return true;
}
_logger.error("the Repository Thing specified doesn't exists!");
} catch (Exception e) {
e.printStackTrace();
_logger.error(e.getMessage());
}
return false;
}
Despite the SourceControlFunctions resource has a ImportSourceControlledEntities service on the THingowrx Composer, I can't find the same service on the Java library, since this entity seems doesn't have an implementation of this method.
How can I achieve this?

