public static void setConnectorXsdSchema(ConnectorType connectorType, Element xsdElement) { PrismObject<ConnectorType> connector = connectorType.asPrismObject(); setConnectorXsdSchema(connector, xsdElement); }
public static ConnectorSchema getConnectorSchema(ConnectorType connectorType, PrismContext prismContext) throws SchemaException { PrismObject<ConnectorType> connector = connectorType.asPrismObject(); return getConnectorSchema(connector, prismContext); }
public static boolean hasParsedSchema(ConnectorType connectorType) { PrismObject<ConnectorType> connector = connectorType.asPrismObject(); return connector.getUserData(USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA) != null; }
public static void setParsedConnectorSchemaConditional(ConnectorType connectorType, ConnectorSchema parsedSchema) { if (hasParsedSchema(connectorType)) { return; } PrismObject<ConnectorType> connector = connectorType.asPrismObject(); connector.setUserData(USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA, parsedSchema); }
public ConnectorType clone() { ConnectorType object = new ConnectorType(); PrismObject value = asPrismObject().clone(); object.setupContainer(value); return object; }
public PrismSchema getConnectorSchema(ConnectorType connectorType) throws SchemaException { PrismObject<ConnectorType> connector = connectorType.asPrismObject(); PrismSchema connectorSchema; Object userDataEntry = connector.getUserData(USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA); if (userDataEntry == null) { InternalMonitor.recordCount(InternalCounters.CONNECTOR_SCHEMA_PARSE_COUNT); connectorSchema = ConnectorTypeUtil.parseConnectorSchema(connectorType, prismContext); if (connectorSchema == null) { throw new SchemaException("No connector schema in "+connectorType); } connector.setUserData(USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA, connectorSchema); } else { if (userDataEntry instanceof PrismSchema) { connectorSchema = (PrismSchema)userDataEntry; } else { throw new IllegalStateException("Expected PrismSchema under user data key "+ USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA+ "in "+connectorType+", but got "+userDataEntry.getClass()); } } return connectorSchema; }
connectorType.setConnectorHost(connectorHost.asObjectable()); PrismObject<ConnectorType> connector = connectorType.asPrismObject(); Object userDataEntry = connector.getUserData(USER_DATA_KEY_PARSED_CONNECTOR_SCHEMA); if (userDataEntry == null) {
private void determineConnectorMappings(Map<String,String> rebindMap, ConnectorType connectorType, ExecutionContext context, OperationResult result) throws ScriptExecutionException { LOGGER.trace("Finding obsolete versions for connector: {}", connectorType.asPrismObject().debugDump()); !foundConnectorType.getConnectorVersion().equals(connectorType.getConnectorVersion())) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Found obsolete connector: {}", foundConnectorType.asPrismObject().debugDump());
+ " new connector(s) from " + connectorHostTypePrismObject + exceptionSuffix(exception)); for (ConnectorType connectorType : newConnectors) { output.addValue(connectorType.asPrismObject().getValue(), item.getResult(), item.getVariables());
try { prismContext.adopt(foundConnector); oid = repositoryService.addObject(foundConnector.asPrismObject(), null, result); } catch (ObjectAlreadyExistsException e) {
if (compareConnectors(connectorType.asPrismObject(), foundConnector)) { if (foundOid != null) {