public ConnectorHostType clone() { ConnectorHostType object = new ConnectorHostType(); PrismObject value = asPrismObject().clone(); object.setupContainer(value); return object; }
public ConnectorHostType(PrismContext prismContext) { setupContainer(new PrismObjectImpl(_getContainerName(), getClass(), prismContext)); }
public ObjectReferenceType beginArchetypeRef() { ObjectReferenceType value = new ObjectReferenceType(); archetypeRef(value); return value; }
public static String getConnectorHostTypeOid(ConnectorType connectorType) { if (connectorType.getConnectorHostRef() != null) { return connectorType.getConnectorHostRef().getOid(); } else if (connectorType.getConnectorHost() != null) { return connectorType.getConnectorHost().getOid(); } else { return null; } }
/** * Returns ICF connector info manager that manages local connectors. The * manager will be created if it does not exist yet. * * @return ICF connector info manager that manages local connectors */ private ConnectorInfoManager getRemoteConnectorInfoManager(ConnectorHostType hostType) { String hostname = hostType.getHostname(); int port = Integer.parseInt(hostType.getPort()); GuardedString key; try { key = new GuardedString(protector.decryptString(hostType.getSharedSecret()).toCharArray()); } catch (EncryptionException e) { throw new SystemException("Shared secret decryption error: "+e.getMessage(),e); } Integer timeout = hostType.getTimeout(); if (timeout == null) { timeout = 0; } boolean useSSL = false; if (hostType.isProtectConnection() != null) { useSSL = hostType.isProtectConnection(); } List<TrustManager> trustManagers = protector.getTrustManagers(); LOGGER.trace("Creating RemoteFrameworkConnectionInfo: hostname={}, port={}, key={}, useSSL={}, trustManagers={}, timeout={}", new Object[] {hostname, port, key, useSSL, trustManagers, timeout}); RemoteFrameworkConnectionInfo remoteFramewrorkInfo = new RemoteFrameworkConnectionInfo(hostname, port, key, useSSL, trustManagers, timeout); return connectorInfoManagerFactory.getRemoteManager(remoteFramewrorkInfo); }
public static void copyFromJAXB(ConnectorHostType jaxb, RConnectorHost repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException { copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult); repo.setNameCopy(RPolyString.copyFromJAXB(jaxb.getName())); repo.setHostname(jaxb.getHostname()); repo.setPort(jaxb.getPort()); } }
/** * Create an instance of {@link ConnectorHostType } * */ public ConnectorHostType createConnectorHostType() { return new ConnectorHostType(); }
public static void addConnectorNames(ConnectorType connectorType, String frameworkPrefix, String bundle, String type, String version, ConnectorHostType hostType) { StringBuilder connectorName = new StringBuilder(); connectorName.append(frameworkPrefix).append(" "); connectorName.append(type); connectorName.append(" v"); connectorName.append(version); StringBuilder displayName = new StringBuilder(StringUtils.substringAfterLast(type, ".")); if (hostType != null) { connectorName.append(" @"); connectorName.append(hostType.getName()); displayName.append(" @"); displayName.append(hostType.getName()); } connectorType.setName(new PolyStringType(connectorName.toString())); connectorType.setDisplayName(new PolyStringType(displayName.toString())); }
/** * Create an instance of {@link ConnectorHostType } * */ public ConnectorHostType createConnectorHostType() { return new ConnectorHostType(); }
if (hostType != null && hostType.getOid() == null) { throw new SystemException("Discovery attempt with non-persistent " + hostType);
/** * Create an instance of {@link ConnectorHostType } * */ public ConnectorHostType createConnectorHostType() { return new ConnectorHostType(); }
public ConnectorHostType archetypeRef(String oid, QName type) { PrismReferenceValue refVal = new PrismReferenceValueImpl(oid, type); ObjectReferenceType ort = new ObjectReferenceType(); ort.setupReferenceValue(refVal); return archetypeRef(ort); }
connectorType.setConnectorHostRef(ObjectTypeUtil.createObjectRef(connectorType.getConnectorHost().getOid(), ObjectTypes.CONNECTOR_HOST)); connectorType.setConnectorHost(null);
public ConnectorHostType beginConnectorHost() { ConnectorHostType value = new ConnectorHostType(); connectorHost(value); return value; }
public ConnectorHostType archetypeRef(String oid, QName type, QName relation) { PrismReferenceValue refVal = new PrismReferenceValueImpl(oid, type); refVal.setRelation(relation); ObjectReferenceType ort = new ObjectReferenceType(); ort.setupReferenceValue(refVal); return archetypeRef(ort); }
.item(SchemaConstants.C_CONNECTOR_FRAMEWORK).eq(connectorType.getFramework()) .and().item(SchemaConstants.C_CONNECTOR_CONNECTOR_TYPE).eq(connectorType.getConnectorType()) .and().item(ConnectorType.F_CONNECTOR_HOST_REF).ref(hostType.getOid(), ConnectorHostType.COMPLEX_TYPE) .build();