Search in sources :

Example 1 with ImportedServiceDescriptor

use of org.qi4j.api.service.ImportedServiceDescriptor in project qi4j-sdk by Qi4j.

the class ServiceLocator method visit.

@Override
public boolean visit(Object visited) throws RuntimeException {
    if (visited instanceof ImportedServiceDescriptor) {
        ImportedServiceDescriptor aDescriptor = (ImportedServiceDescriptor) visited;
        String identity = aDescriptor.identity();
        if (serviceId.equals(identity)) {
            layerName = tempLayerName;
            moduleName = tempModuleName;
            serviceType = aDescriptor.type();
        }
    }
    return true;
}
Also used : ImportedServiceDescriptor(org.qi4j.api.service.ImportedServiceDescriptor)

Example 2 with ImportedServiceDescriptor

use of org.qi4j.api.service.ImportedServiceDescriptor in project qi4j-sdk by Qi4j.

the class ImportedByPane method setDescriptor.

@Override
protected void setDescriptor(Object objectDesciptor) {
    clear();
    if (!(objectDesciptor instanceof ImportedServiceDetailDescriptor)) {
        return;
    }
    ImportedServiceDetailDescriptor detailDescriptor = (ImportedServiceDetailDescriptor) objectDesciptor;
    ImportedServiceDescriptor descriptor = detailDescriptor.descriptor().importedService();
    Class<? extends ServiceImporter> importer = descriptor.serviceImporter();
    nameLabel.setText(importer.getSimpleName());
    classLabel.setText(importer.toString());
}
Also used : ImportedServiceDescriptor(org.qi4j.api.service.ImportedServiceDescriptor) ImportedServiceDetailDescriptor(org.qi4j.tools.model.descriptor.ImportedServiceDetailDescriptor)

Example 3 with ImportedServiceDescriptor

use of org.qi4j.api.service.ImportedServiceDescriptor in project qi4j-sdk by Qi4j.

the class PDFWriter method writeTypeImportedByPage.

private void writeTypeImportedByPage(Object objectDesciptor) {
    setFont(header5Font, header5FontSize);
    writeString("Imported by: ", headerLineSpace);
    ImportedServiceDetailDescriptor detailDescriptor = (ImportedServiceDetailDescriptor) objectDesciptor;
    ImportedServiceDescriptor descriptor = detailDescriptor.descriptor().importedService();
    Class<? extends ServiceImporter> importer = descriptor.serviceImporter();
    setFont(normalFont, normalFontSize);
    writeString("- name: " + importer.getSimpleName());
    writeString("- class: " + importer.toString());
}
Also used : ImportedServiceDescriptor(org.qi4j.api.service.ImportedServiceDescriptor)

Aggregations

ImportedServiceDescriptor (org.qi4j.api.service.ImportedServiceDescriptor)3 ImportedServiceDetailDescriptor (org.qi4j.tools.model.descriptor.ImportedServiceDetailDescriptor)1