public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName) { JmsDestinationModel model = null; JNDIResourceModel jndiRef = jndiResourceService.createUnique(applications, jndiName); if (jndiRef instanceof JmsDestinationModel) { model = (JmsDestinationModel) jndiRef; } else { model = this.addTypeToModel(jndiRef); } return model; }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, String destinationTypeClass) { JmsDestinationType destinationType = JmsDestinationService.getTypeFromClass(destinationTypeClass); return this.createUnique(applications, jndiName, destinationType); }
/** * Creates a new {@link EnvironmentReferenceService}. */ public EnvironmentReferenceService(GraphContext context) { super(context, EnvironmentReferenceModel.class); jndiResourceService = new JNDIResourceService(context); }
/** * Create unique; if existing convert an existing {@link DataSourceModel} if one exists. */ public synchronized DataSourceModel createUnique(Set<ProjectModel> applications, String dataSourceName, String jndiName) { JNDIResourceModel jndiResourceModel = new JNDIResourceService(getGraphContext()).createUnique(applications, jndiName); final DataSourceModel dataSourceModel; if (jndiResourceModel instanceof DataSourceModel) { dataSourceModel = (DataSourceModel) jndiResourceModel; } else { dataSourceModel = addTypeToModel(jndiResourceModel); } dataSourceModel.setName(dataSourceName); return dataSourceModel; } }
public EnvironmentReferenceModel findEnvironmentReference(String name, String type) { GraphQuery query = getTypedQuery().has(EnvironmentReferenceModel.NAME, name).has( EnvironmentReferenceModel.REFERENCE_TYPE, type); return getUnique(query); } }
/** * Finds a {@link EnvironmentReferenceModel} by name and type. */ public EnvironmentReferenceModel findEnvironmentReference(String name, EnvironmentReferenceTagType type) { Traversal<?, ?> query = findAllQuery().getRawTraversal().has(EnvironmentReferenceModel.NAME, name).has( EnvironmentReferenceModel.TAG_TYPE, type); return getUnique(query); }
protected void processServerResources(GraphContext context) { JNDIResourceService jndiService = new JNDIResourceService(context); GraphService<ThreadPoolModel> threadPoolService = new GraphService<>(context, ThreadPoolModel.class); for(JNDIResourceModel model : jndiService.findAll()) { processJndiResource(context, model); } for(ThreadPoolModel model : threadPoolService.findAll()) { processThreadPool(context, model); } }
public void perform(GraphRewrite event, EvaluationContext context, EjbSessionBeanModel payload) { if (payload.getEjbRemote() != null) { EjbRemoteServiceModelService service = new EjbRemoteServiceModelService(event.getGraphContext()); service.getOrCreate(payload.getApplications(), payload.getEjbRemote(), payload.getEjbClass()); } } }
public VendorSpecificationExtensionService(GraphContext context) { super(context, VendorSpecificationExtensionModel.class); fileService = new FileService(this.getGraphContext()); }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
/** * Create unique; if existing convert an existing {@link DataSourceModel} if one exists. */ public synchronized DataSourceModel createUnique(Set<ProjectModel> applications, String dataSourceName, String jndiName) { JNDIResourceModel jndiResourceModel = new JNDIResourceService(getGraphContext()).createUnique(applications, jndiName); final DataSourceModel dataSourceModel; if (jndiResourceModel instanceof DataSourceModel) { dataSourceModel = (DataSourceModel) jndiResourceModel; } else { dataSourceModel = addTypeToModel(jndiResourceModel); } dataSourceModel.setName(dataSourceName); return dataSourceModel; } }
public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName) { JmsDestinationModel model = null; JNDIResourceModel jndiRef = jndiResourceService.createUnique(applications, jndiName); if (jndiRef instanceof JmsDestinationModel) { model = (JmsDestinationModel) jndiRef; } else { model = this.addTypeToModel(jndiRef); } return model; }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, String destinationTypeClass) { JmsDestinationType destinationType = JmsDestinationService.getTypeFromClass(destinationTypeClass); return this.createUnique(applications, jndiName, destinationType); }
protected void processServerResources(GraphContext context) { JNDIResourceService jndiService = new JNDIResourceService(context); GraphService<ThreadPoolModel> threadPoolService = new GraphService<>(context, ThreadPoolModel.class); for(JNDIResourceModel model : jndiService.findAll()) { processJndiResource(context, model); } for(ThreadPoolModel model : threadPoolService.findAll()) { processThreadPool(context, model); } }
public void perform(GraphRewrite event, EvaluationContext context, EjbSessionBeanModel payload) { if (payload.getEjbRemote() != null) { EjbRemoteServiceModelService service = new EjbRemoteServiceModelService(event.getGraphContext()); service.getOrCreate(payload.getApplications(), payload.getEjbRemote(), payload.getEjbClass()); } } }
/** * Creates a new {@link JmsDestinationService} instance. */ public JmsDestinationService(GraphContext context) { super(context, JmsDestinationModel.class); this.jndiResourceService = new JNDIResourceService(context); }
public VendorSpecificationExtensionService(GraphContext context) { super(context, VendorSpecificationExtensionModel.class); fileService = new FileService(this.getGraphContext()); }
/** * Creates a new instance with the given name, or converts an existing instance at this location if one already exists */ public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) { JmsDestinationModel model = createUnique(applications, jndiName); model.setDestinationType(destinationType); return model; }
/** * Creates a new {@link EnvironmentReferenceService}. */ public EnvironmentReferenceService(GraphContext context) { super(context, EnvironmentReferenceModel.class); jndiResourceService = new JNDIResourceService(context); }
/** * Creates a new {@link JmsDestinationService} instance. */ public JmsDestinationService(GraphContext context) { super(context, JmsDestinationModel.class); this.jndiResourceService = new JNDIResourceService(context); }