Skip to content

ServicePlugin & newRevision #1369

Description

@mostl33

Heya!

I am running a local dev checkout of BIMServer in my IDE (Eclipse). I've create a simple plugin by extending ServicePlugin and creating the "register"-method:

	@Override
	public void register(long uoid, SInternalServicePluginConfiguration internalService,
			PluginConfiguration pluginConfiguration) {
		ServiceDescriptor serviceDescriptor = StoreFactory.eINSTANCE.createServiceDescriptor();
		serviceDescriptor.setProviderName("XRAY");
		serviceDescriptor.setIdentifier("" + internalService.getOid());
		serviceDescriptor.setName("XRAY");
		serviceDescriptor.setDescription("XRAY FTW");
		serviceDescriptor.setNotificationProtocol(AccessMethod.INTERNAL);
		serviceDescriptor.setTrigger(Trigger.NEW_REVISION);
		
		serviceDescriptor.setReadRevision(true);
		
		LOGGER.info("XRay - register");
		
		registerNewRevisionHandler(uoid, serviceDescriptor, new NewRevisionHandler() {

			@Override
			public void newRevision(BimServerClientInterface bimServerClientInterface, long poid, long roid,
					String userToken, long soid, SObjectType settings) throws ServerException, UserException {
				
				LOGGER.info("registerNewRevisionHandler - newRevision");
				
			}
			
		});
		
	}

XML:

<PluginDescriptor>
	<JavaPlugin>
		<interfaceClass>org.bimserver.plugins.services.ServicePlugin</interfaceClass>
		<implementationClass>com.demotime.XRay</implementationClass>
		<description>Fancy</description>
		<name>XRay</name>
	</JavaPlugin>
	
</PluginDescriptor>

The plugin is loaded as an enabled (listed in BIMvie.ws) "Internal Service" (no idea what "internal" means in this context).

Shouldn't an upload ("Checkin") of an IFC file through BIMvie.ws (or a POST to "/upload") trigger a call to "newRevision"?

Thanks in advance.

Best regards,

Martin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions