/** * avtivates the component and adds the enrichment-graph to the virtual * content graph. * * gets the base content-graph from tcManager and sets the permission * required to access the enrichment-graph accordingly */ protected void activate(ComponentContext context) { contentGraph = tcManager.getMGraph(Constants.CONTENT_GRAPH_URI); Collection<Permission> requiredReadPermissions = tcManager.getTcAccessController().getRequiredReadPermissions(Constants.CONTENT_GRAPH_URI); if (requiredReadPermissions.isEmpty()) { tcManager.getTcAccessController().setRequiredReadPermissionStrings( ENRICHMENT_GRAPH_URI, Collections.singleton( new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString() )); } else { tcManager.getTcAccessController().setRequiredReadPermissions( ENRICHMENT_GRAPH_URI, requiredReadPermissions); } cgProvider.addTemporaryAdditionGraph(ENRICHMENT_GRAPH_URI); }