Skip to content

Commit

Permalink
SDK generation modification
Browse files Browse the repository at this point in the history
  • Loading branch information
nocs00 committed Jul 11, 2016
1 parent 47f6d12 commit dade14f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.
Expand Up @@ -1031,21 +1031,6 @@ List<NotificationSchemaDto> findNotificationSchemasByAppIdAndType(String applica
*/ */
EventClassFamilyDto getEventClassFamily(String eventClassFamilyId) throws ControlServiceException; EventClassFamilyDto getEventClassFamily(String eventClassFamilyId) throws ControlServiceException;


/**
* Adds the event class family schema.
*
* @param eventClassFamilyId
* the event class family id
* @param eventClassFamilySchema
* the event class family schema
* @param createdUsername
* the created username
* @throws ControlServiceException
* the control service exception
*/
void addEventClassFamilySchema(String eventClassFamilyId, String eventClassFamilySchema, String createdUsername)
throws ControlServiceException;

/** /**
* Gets the event classes by family id version and type. * Gets the event classes by family id version and type.
* *
Expand Down
Expand Up @@ -47,13 +47,7 @@
import org.kaaproject.kaa.common.dto.credentials.EndpointRegistrationDto; import org.kaaproject.kaa.common.dto.credentials.EndpointRegistrationDto;
import org.kaaproject.kaa.common.dto.ctl.CTLSchemaDto; import org.kaaproject.kaa.common.dto.ctl.CTLSchemaDto;
import org.kaaproject.kaa.common.dto.ctl.CTLSchemaMetaInfoDto; import org.kaaproject.kaa.common.dto.ctl.CTLSchemaMetaInfoDto;
import org.kaaproject.kaa.common.dto.event.AefMapInfoDto; import org.kaaproject.kaa.common.dto.event.*;
import org.kaaproject.kaa.common.dto.event.ApplicationEventFamilyMapDto;
import org.kaaproject.kaa.common.dto.event.EcfInfoDto;
import org.kaaproject.kaa.common.dto.event.EventClassDto;
import org.kaaproject.kaa.common.dto.event.EventClassFamilyDto;
import org.kaaproject.kaa.common.dto.event.EventClassType;
import org.kaaproject.kaa.common.dto.event.EventSchemaVersionDto;
import org.kaaproject.kaa.common.dto.file.FileData; import org.kaaproject.kaa.common.dto.file.FileData;
import org.kaaproject.kaa.common.dto.logs.LogAppenderDto; import org.kaaproject.kaa.common.dto.logs.LogAppenderDto;
import org.kaaproject.kaa.common.dto.logs.LogSchemaDto; import org.kaaproject.kaa.common.dto.logs.LogSchemaDto;
Expand Down Expand Up @@ -84,7 +78,6 @@
import org.kaaproject.kaa.server.common.dao.exception.EndpointRegistrationServiceException; import org.kaaproject.kaa.server.common.dao.exception.EndpointRegistrationServiceException;
import org.kaaproject.kaa.server.common.dao.exception.IncorrectParameterException; import org.kaaproject.kaa.server.common.dao.exception.IncorrectParameterException;
import org.kaaproject.kaa.server.common.dao.exception.NotFoundException; import org.kaaproject.kaa.server.common.dao.exception.NotFoundException;
import org.kaaproject.kaa.server.common.dao.model.sql.NotificationSchema;
import org.kaaproject.kaa.server.common.log.shared.RecordWrapperSchemaGenerator; import org.kaaproject.kaa.server.common.log.shared.RecordWrapperSchemaGenerator;
import org.kaaproject.kaa.server.common.thrift.KaaThriftService; import org.kaaproject.kaa.server.common.thrift.KaaThriftService;
import org.kaaproject.kaa.server.common.thrift.gen.operations.Notification; import org.kaaproject.kaa.server.common.thrift.gen.operations.Notification;
Expand Down Expand Up @@ -1088,10 +1081,12 @@ public FileData generateSdk(SdkProfileDto sdkProfile, SdkPlatform platform) thro
efm.setEcfName(ecf.getName()); efm.setEcfName(ecf.getName());
efm.setEcfNamespace(ecf.getNamespace()); efm.setEcfNamespace(ecf.getNamespace());
efm.setEcfClassName(ecf.getClassName()); efm.setEcfClassName(ecf.getClassName());
List<EventSchemaVersionDto> ecfSchemas = ecf.getSchemas(); List<EventClassFamilyVersionDto> ecfSchemas = eventClassService.findEventClassFamilyVersionsById(aefMap.getEcfId());
for (EventSchemaVersionDto ecfSchema : ecfSchemas) { for (EventClassFamilyVersionDto ecfSchema : ecfSchemas) {
if (ecfSchema.getVersion() == efm.getVersion()) { if (ecfSchema.getVersion() == efm.getVersion()) {
efm.setEcfSchema(ecfSchema.getSchema()); List<EventClassDto> records = eventClassService.findEventClassesByFamilyIdVersionAndType(ecfSchema.getId(), ecfSchema.getVersion(), EventClassType.EVENT);
records.addAll(eventClassService.findEventClassesByFamilyIdVersionAndType(ecfSchema.getId(), ecfSchema.getVersion(), EventClassType.OBJECT));
efm.setRecords(records);
break; break;
} }
} }
Expand Down Expand Up @@ -1516,19 +1511,6 @@ public EventClassFamilyDto getEventClassFamily(String eventClassFamilyId) throws
return eventClassService.findEventClassFamilyById(eventClassFamilyId); return eventClassService.findEventClassFamilyById(eventClassFamilyId);
} }


/*
* (non-Javadoc)
*
* @see org.kaaproject.kaa.server.control.service.ControlService#
* addEventClassFamilySchema(java.lang.String, java.lang.String,
* java.lang.String)
*/
@Override
public void addEventClassFamilySchema(String eventClassFamilyId, String eventClassFamilySchema, String createdUsername)
throws ControlServiceException {
eventClassService.addEventClassFamilySchema(eventClassFamilyId, eventClassFamilySchema, createdUsername);
}

/* /*
* (non-Javadoc) * (non-Javadoc)
* *
Expand Down

0 comments on commit dade14f

Please sign in to comment.