private Pair findBottom(final Attribute value, final PairList points) { Pair bottom = null; for (Pair point : points) { // Check if the point is NOT after the value if (HelperCOM.evaluateExpression(point.getFirst(), ExpressionOperator.LESS, value)) { if (bottom == null) { bottom = point; continue; } if (HelperCOM.evaluateExpression(point.getFirst(), ExpressionOperator.GREATER, bottom.getFirst())) { bottom = point; } } } return bottom; }
public synchronized IntegerList getDomainIds(final IdentifierList inputDomain) { final IntegerList ids = new IntegerList(); if (inputDomain == null) { return ids; } if (HelperCOM.domainContainsWildcard(inputDomain)) { for (Map.Entry<IdentifierList, Integer> entry : this.fastID.entrySet()) { try { if (HelperCOM.domainMatchesWildcardDomain(entry.getKey(), inputDomain)) { // Does the domain matches the wildcard? ids.add(entry.getValue()); } } catch (Exception ex) { Logger.getLogger(FastDomain.class.getName()).log(Level.SEVERE, null, ex); } } } else { final Integer id = this.fastID.get(inputDomain); if (id == null) { ids.add(this.addNewDomain(inputDomain)); } else { ids.add(id); } } return ids; }
public Long getObjectTypeId() { return HelperCOM.generateSubKey(this.objectType); }
obj = HelperCOM.getNestedObject(obj, compositeFilter.getFieldName()); } catch (NoSuchFieldException ex) { Boolean evaluation = HelperCOM.evaluateExpression(leftHandSide, compositeFilter.getType(), compositeFilter.getFieldValue());
Subscription eventSub = HelperCOM.generateSubscriptionCOMEvent( "ClosingAppEvents", AppsLauncherHelper.APP_OBJECT_TYPE);
|| HelperCOM.domainContainsWildcard(lArchiveQueryList.get(index).getDomain())) { // Any wilcards? if so, then send the updates separately
if (!timestampSorting) { try { obj1 = HelperCOM.getNestedObject(((ArchivePersistenceObject) in1).getObject(), this.fieldName); } catch (NoSuchFieldException ex) { obj1 = null; obj2 = HelperCOM.getNestedObject(((ArchivePersistenceObject) in2).getObject(), this.fieldName); } catch (NoSuchFieldException ex) { obj2 = null;
public static Object getNestedObject(Object in, String fieldName) throws NoSuchFieldException { Object obj = in; String[] parts = fieldName.split("\\."); try { for (String part : parts) { if (!part.equals("")) { obj = HelperCOM.getObjectInsideObject(part, obj); } else { // Then it is a Enumeration // obj = ((Enumeration) obj).getNumericValue(); } } } catch (IllegalArgumentException ex) { throw new NoSuchFieldException(); } catch (IllegalAccessException ex) { throw new NoSuchFieldException(); } return obj; }
return rightHandSideString.equals(leftHandSideString); } else { return (objectEquals(rightHandSideDouble, leftHandSideDouble)); return !(rightHandSideString.equals(leftHandSideString)); } else { return !(objectEquals(rightHandSideDouble, leftHandSideDouble));
private static ObjectIdList generateSources(final ObjectType objType, final IdentifierList domain, final LongList objIds) { final ObjectIdList sourceList = new ObjectIdList(objIds.size()); for (int i = 0; i < objIds.size(); i++) { final ObjectId source = new ObjectId(objType, new ObjectKey(domain, objIds.get(i))); // Is the COM Object an Event coming from the archive? if (source.getType().equals(HelperCOM.generateCOMObjectType(ArchiveHelper.ARCHIVE_SERVICE, source.getType().getNumber()))) { continue; // requirement: 3.4.2.5 } sourceList.add(source); } return sourceList; }
/** * Returns the Name of the COM object from the objectType * * @param objType Object Type * @return Name of the COM object */ public static String objType2string(final ObjectType objType) { final COMObject comObject = HelperCOM.objType2COMObject(objType); String string = MALContextFactory.lookupArea( objType.getArea(), objType.getAreaVersion() ).getName().toString(); string += " - " + MALContextFactory.lookupArea( objType.getArea(), objType.getAreaVersion() ).getServiceByNumber(objType.getService()).getName().toString(); if (comObject != null) { string += ": " + comObject.getObjectName().getValue(); } return string; }
subscription = HelperCOM.generateSubscriptionCOMEvent( "CloseAppEventListener", AppsLauncherHelper.APP_OBJECT_TYPE);
if (HelperCOM.domainContainsWildcard(inDomain)) { // requirement: 3.4.3.2.4
} else { try { // Does the Field asked for, exists? HelperCOM.getNestedObject(obj, compositeFilter.getFieldName()); } catch (NoSuchFieldException ex) { return false;
private Pair findTop(final Attribute value, final PairList points) { Pair top = null; for (Pair point : points) { // Check if the point is after the value if (HelperCOM.evaluateExpression(point.getFirst(), ExpressionOperator.GREATER, value)) { if (top == null) { top = point; continue; } if (HelperCOM.evaluateExpression(point.getFirst(), ExpressionOperator.LESS, top.getFirst())) { top = point; } } } return top; }
public synchronized Integer getObjectTypeId(final ObjectType objectType) { final Long longObjType = HelperCOM.generateSubKey(objectType); final Integer id = this.fastID.get(longObjType); return (id == null) ? this.addNew(longObjType) : id; }
if (HelperCOM.domainContainsWildcard(lIdentifierList)) { // requirement: 3.4.8.2.2 throw new MALInteractionException(new MALStandardError(COMHelper.INVALID_ERROR_NUMBER, null)); // requirement: 3.4.8.2.3
private Attribute applyRangeConversion(final RangeConversionDetails conversionDetails, final Attribute value) { //requirement: 3.8.3.f => no entry in the points-list returns null // Do we have a direct hit? final PairList points = conversionDetails.getPoints(); for (Pair point : points) { if (HelperCOM.evaluateExpression(point.getFirst(), ExpressionOperator.EQUAL, value)) { // If we get a hit, then return it right away return point.getSecond(); } } Pair bottom = findBottom(value, points); if (bottom == null) { return null; } return bottom.getSecond(); }
/** * Creates a subscription object for the Event service. This subscription * selects all the COM Events of a certain service. * * @param identifier A name identifier for the subscription * @param objType The object type containing the area, service, and version * of the service to be selected. * @return */ public static Subscription generateSubscriptionCOMEvent(String identifier, ObjectType objType) { final Long secondEntityKey = 0xFFFFFFFFFF000000L & HelperCOM.generateSubKey(objType); final Random random = new Random(); return ConnectionConsumer.subscriptionKeys( new Identifier(identifier + random.nextInt()), new Identifier("*"), secondEntityKey, new Long(0), new Long(0)); } }
|| HelperCOM.domainContainsWildcard(domain)) { // requirement: 3.4.7.2.8 (first part) throw new MALInteractionException(new MALStandardError(COMHelper.INVALID_ERROR_NUMBER, null));