fferpcore.MessageTypeTreeNodeglobal abstract class MessageTypeTreeNode A message type tree node structure. Properties
Methods
getDeveloperNameglobal abstract String getDeveloperName() This method returns the developer name associated with the message type this node represents. This method must be implemented by a class that extends MessageTypeTreeNode. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); getDescriptionglobal abstract String getDescription() This method returns the description of the message type associated with this node. This method must be implemented by a class that extends MessageTypeTreeNode. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getName()); getNameglobal abstract String getName() This method returns the name of the message type associated with this node. This method must be implemented by a class that extends fferpcore.MessageTypeTreeNode Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); fferpcore.MessageTypeService.updateRetentionSettings(new Map<String, String>{'MessageTypeDeveloperName' => '6m'}); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getName()); getIdglobal virtual Id getId() This method by default returns null. When implemented, this method returns the name of the message type associated with this node. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); Id nodeId = childNodes[0].getId(); getRetentionglobal abstract String getRetention() This method returns the retention setting of the message type associated with this node. This method must be implemented by a class that extends MessageTypeTreeNode. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); fferpcore.MessageTypeService.updateRetentionSettings(new Map<String, String>{'MessageTypeDeveloperName' => '6m'}); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals('6m', childNodes[0].getRetention()); isInheritRetentionglobal abstract Boolean isInheritRetention() This method returns true or false based on whether the message type associated with this node inherits retention information from its parent. This method must be implemented by a class that extends MessageTypeTreeNode. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); fferpcore.MessageTypeService.updateRetentionSettings(new Map<String, String>{'MessageTypeDeveloperName' => '6m'}); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals(false, childNodes[0].isInheritRetention()); getChildrenglobal abstract List<fferpcore.MessageTypeTreeNode> getChildren() This method returns true or false based on whether the message type associated with this node inherits retention information from its parent. This method must be implemented by a class that extends fferpcore.MessageTypeTreeNode Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); fferpcore.MessageTypeService.updateRetentionSettings(new Map<String, String>{'MessageTypeDeveloperName' => '6m'}); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); hasEndpointsglobal abstract Boolean hasEndpoints() This method checks to see if there are any publications or subscriptions associated with this message type tree node and returns true or false depending on the result. This method must be implemented by a class that extends fferpcore.MessageTypeTreeNode Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals(true, childNodes[0].hasEndpoints()); getEndPointsglobal abstract List<fferpcore.MessageTypeTreeNode.EndPoint> getEndPoints() This method checks to see if there are any publications or subscriptions associated with this message type tree node and returns a list of endpoints. This method must be implemented by a class that extends fferpcore.MessageTypeTreeNode Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); request.addSubscription('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals(true, childNodes[0].hasEndpoints()); List<fferpcore.MessageTypeTreeNode.Endpoint> endpoints = childNodes[0].getEndPoints(); System.assertEquals(2, endpoints.size());< setProductCanPublishglobal abstract void setProductCanPublish(String productDeveloperName, Boolean value) This method takes a product's developer name and true or false and modifies the corresponding publication's enable status to this new value. This method must be implemented by a class that extends MessageTypeTreeNode. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals(true, childNodes[0].hasEndpoints()); childNodes[0].setProductCanPublish('developerName', true); setProductCanSubscribeglobal abstract void setProductCanSubscribe(String productDeveloperName, Boolean value) This method take's a product's developer name and true or false and modifies the corresponding subscription's enable status to this new value. This method must be implemented by a class that extends MessageTypeTreeNode. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals(true, childNodes[0].hasEndpoints()); childNodes[0].setProductCanSubscribe('developerName', true); fferpcore.MessageTypeTreeNode.EndPointglobal abstract class EndPoint An endpoint structure. This class is a child class of MessageTypeTreeNode. Methods
getIdglobal virtual Id getId() This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Return ValueThe Id associated with the publication or subscription this endpoint represents. getProductDeveloperNameglobal abstract String getProductDeveloperName() This method returns the product developer name associated with the publication or subscription this endpoint represents. This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); request.addSubscription('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals(true, childNodes[0].hasEndpoints()); List<fferpcore.MessageTypeTreeNode.Endpoint> endpoints = childNodes[0].getEndPoints(); System.assertEquals(2, endpoints.size()); System.assertEquals('developerName', endpoints[0].getProductDeveloperName); getProductProxyglobal virtual String getProductProxy() This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Return ValueThe Product Proxy associated with the publication or subscription this endpoint represents. getIdentifierglobal virtual String getIdentifier() This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Return ValueThe Identifier associated with the publication or subscription this endpoint represents. isEnabledglobal abstract Boolean isEnabled() This method returns details regarding whether the publication or subscription this endpoint represents is enabled. This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); request.addSubscription('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals(true, childNodes[0].hasEndpoints()); List<fferpcore.MessageTypeTreeNode.Endpoint> endpoints = childNodes[0].getEndPoints(); System.assertEquals(2, endpoints.size()); System.assertEquals(false, endpoints[0].isEnabled()); setEnabledglobal abstract void setEnabled(Boolean value) This method takes true or false and modifies the corresponding publication's or subscription's (which is defined by the endpoint) enable status to this new value. This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); request.addSubscription('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals('MessageTypeDeveloperName', childNodes[0].getDeveloperName()); System.assertEquals(true, childNodes[0].hasEndpoints()); List<fferpcore.MessageTypeTreeNode.Endpoint> endpoints = childNodes[0].getEndPoints(); System.assertEquals(2, endpoints.size()); System.assertEquals(false, endpoints[0].isEnabled()); endpoints[0].setEnabled(true); System.assertEquals(true, endpoints[0].isEnabled()); isPublicationglobal abstract Boolean isPublication() This method returns true if the endpoint represents a publication and false if the endpoint is a subscription. This method must be implemented by a class that extends MessageTypeTreeNode.EndPoint. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('developerName', 'Name', new Version(1, 0, 0)); request.addPublication('MessageTypeDeveloperName'); request.addSubscription('MessageTypeDeveloperName'); fferpcore.RegistrationService.registerProduct(request); List<fferpcore.MessageTypeTreeNode> nodes = fferpcore.MessageTypeService.getMessageTypeTrees(); System.assertEquals(1, nodes.size()); List<fferpcore.MessageTypeTreeNode> childNodes = nodes.getChildren(); System.assertEquals(1, childNodes.size()); System.assertEquals(true, childNodes[0].hasEndpoints()); List<fferpcore.MessageTypeTreeNode.Endpoint> endpoints = childNodes[0].getEndPoints(); System.assertEquals(2, endpoints.size()); System.assertEquals(true, endpoints[0].isPublication()); System.assertEquals(false, endpoints[1].isPublication()); |