/** * Create an instance of {@link GlobalPolicy } * */ public GlobalPolicy createGlobalPolicy() { return new GlobalPolicy(); }
GlobalPolicy ret = new GlobalPolicy(); Connection con; if (pooled) { boolean foundPolicy = false; if (results.next()) { ret.setPolicyRefreshRate(df.newDuration(results.getLong("PolicyRefreshRate"))); ret.setRecordedMessageCap(results.getInt("RecordedMessageCap")); SecurityWrapper wrap = new SecurityWrapper(ClassificationType.fromValue(results.getString("classification")), results.getString("caveat")); ret.setClassification(wrap); ret.setAgentsEnabled(results.getBoolean("agentsenable")); comm.setString(4, ""); comm.execute(); ret.setRecordedMessageCap(1024000); ret.setClassification(new SecurityWrapper(ClassificationType.U, "None")); ret.setAgentsEnabled(true); } catch (SQLException ex) { Logger.getLogger(Utility.logname).log(Level.ERROR, "error setting global policy", ex); if (d != null && d.getKeyNameValue() != null) { try { ret.setUDDIPublishRate(df.newDuration(Long.parseLong(d.getKeyNameValue().getPropertyValue()))); } catch (Exception ex) { ret.setUDDIPublishRate(df.newDuration(30 * 60 * 100)); ret.setUDDIPublishRate(df.newDuration(30 * 60 * 100));
ret.setPolicyRefreshRate(gp.getPolicyRefreshRate());
GetGlobalPolicyResponseMsg response = new GetGlobalPolicyResponseMsg(); try { response.setPolicy(new GlobalPolicy()); response.getPolicy().setPolicyRefreshRate(df.newDuration(results.getLong("PolicyRefreshRate"))); response.getPolicy().setRecordedMessageCap(results.getInt("RecordedMessageCap")); SecurityWrapper wrap = new SecurityWrapper(ClassificationType.fromValue(results.getString("classification")), results.getString("caveat")); response.setClassification(wrap); response.getPolicy().setAgentsEnabled(results.getBoolean("agentsenable")); foundPolicy = true; comm.setString(4, ""); comm.execute(); response.getPolicy().setRecordedMessageCap(1024000); response.getPolicy().setClassification(new SecurityWrapper(ClassificationType.U, "")); response.getPolicy().setAgentsEnabled(true); } catch (SQLException ex) { log.log(Level.ERROR, "error setting global policy", ex); if (d != null && d.getKeyNameValue() != null) { try { response.getPolicy().setUDDIPublishRate(df.newDuration(Long.parseLong(d.getKeyNameValue().getPropertyValue()))); } catch (Exception ex) { response.getPolicy().setUDDIPublishRate(df.newDuration(30 * 60 * 100));