@Override public boolean validateCommand(CommandContext commandContext) { return !commandContext.getVdb().getDataPolicies().isEmpty(); }
@Doc(text = "Checks if a specific VDB version exists") public static boolean hasVDB( @Doc(text = "vdb name") String vdbName, @Doc(text = "vdb version") Object vdbVersion) throws AdminException { Collection<? extends VDB> vdbs = getAdmin().getVDBs(); for (VDB vdb:vdbs) { if (vdb.getName().equals(vdbName) && vdb.getVersion().equals(vdbVersion)) { return true; } } return false; }
public String getSecurityDomain(String vdbName, String version, VDB vdb) { if (vdbName != null) { try { if (vdb == null) { vdb = getActiveVDB(vdbName, version); } if (vdb != null) { String typeProperty = vdb.getPropertyValue(SECURITY_DOMAIN_PROPERTY); if (typeProperty != null) { return typeProperty; } } } catch (SessionServiceException e) { // ignore and return default, this only occur if the name and version are wrong } } return this.securityDomainName; }
String vdbName = this.vdb.getName(); String vdbVersion = this.vdb.getVersion(); boolean implicitVdb = vdb.getPropertyValue("implicit") != null && vdb.getPropertyValue("implicit").equals("true");
public static String[] current_schemas(CommandContext cc, boolean include_implicit) { //TODO: when schemas are hidden we should use the system metadata or other logic to hide them here as well if (include_implicit) { VDBMetaData metadata = (VDBMetaData) cc.getVdb(); TransformationMetadata tm = metadata.getAttachment(TransformationMetadata.class); List<Schema> schemas = tm.getMetadataStore().getSchemaList(); String[] results = new String[schemas.size()]; for (int i = 0; i < results.length; i++) { results[i] = schemas.get(i).getName(); } return results; } List<Model> models = cc.getVdb().getModels(); String[] results = new String[models.size()]; for (int i = 0; i < results.length; i++) { results[i] = models.get(i).getName(); } return results; }
@Doc(text = "Checks if a VDB exists") public static boolean hasVDB( @Doc(text = "vdb name") String vdbName) throws AdminException { Collection<? extends VDB> vdbs = getAdmin().getVDBs(); for (VDB vdb:vdbs) { if (vdb.getName().equals(vdbName)) { return true; } } return false; }
public static void setConnectionProperties(ConnectionImpl conn) throws SQLException { SessionMetadata sm = ((LocalServerConnection)conn.getServerConnection()).getWorkContext().getSession(); VDB vdb = sm.getVdb(); Properties p = vdb.getProperties(); setConnectionProperties(conn, p); }
for (Model m : vdb.getModels()) {
@Override public boolean validateCommand(CommandContext commandContext) { return !commandContext.getVdb().getDataPolicies().isEmpty(); }
String gssPattern = vdb.getPropertyValue(GSS_PATTERN_PROPERTY); String passwordPattern = vdb.getPropertyValue(PASSWORD_PATTERN_PROPERTY); String typeProperty = vdb.getPropertyValue(AUTHENTICATION_TYPE_PROPERTY); if (typeProperty != null) { return AuthenticationType.valueOf(typeProperty);
@Override public boolean validateCommand(CommandContext commandContext) { return !commandContext.getVdb().getDataPolicies().isEmpty(); }