X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=renderers%2Fopflex%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fgroupbasedpolicy%2Frenderer%2Fopflex%2Flib%2FRole.java;h=c362be34c0a127e010cb00e47362d0d09583a86e;hb=295c46266e428a465598e2672e82a367ae33e41c;hp=a9bb61c8a6c076494d68e14304a442d5f2271d72;hpb=453389b992cc46ac90fb1617752367648619b904;p=groupbasedpolicy.git diff --git a/renderers/opflex/src/main/java/org/opendaylight/groupbasedpolicy/renderer/opflex/lib/Role.java b/renderers/opflex/src/main/java/org/opendaylight/groupbasedpolicy/renderer/opflex/lib/Role.java index a9bb61c8a..c362be34c 100644 --- a/renderers/opflex/src/main/java/org/opendaylight/groupbasedpolicy/renderer/opflex/lib/Role.java +++ b/renderers/opflex/src/main/java/org/opendaylight/groupbasedpolicy/renderer/opflex/lib/Role.java @@ -1,10 +1,10 @@ /* * Copyright (C) 2014 Cisco Systems, Inc. - * + * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html - * + * * Authors : Thomas Bachman */ package org.opendaylight.groupbasedpolicy.renderer.opflex.lib; @@ -12,7 +12,7 @@ package org.opendaylight.groupbasedpolicy.renderer.opflex.lib; import java.util.ArrayList; import java.util.List; -import org.opendaylight.groupbasedpolicy.jsonrpc.RpcMessage; +import org.opendaylight.groupbasedpolicy.renderer.opflex.jsonrpc.RpcMessage; import org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages.EndpointDeclareRequest; import org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages.EndpointDeclareResponse; import org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages.EndpointUndeclareRequest; @@ -35,32 +35,28 @@ import org.opendaylight.groupbasedpolicy.renderer.opflex.lib.messages.PolicyUpda * Enum for OpFlex roles and their supported messages * * @author tbachman - * */ public enum Role { - DISCOVERY("discovery"), - POLICY_REPOSITORY("policy_repository"), - ENDPOINT_REGISTRY("endpoint_registry"), - OBSERVER("observer"), - POLICY_ELEMENT("policy_element"); + DISCOVERY("discovery"), POLICY_REPOSITORY("policy_repository"), ENDPOINT_REGISTRY("endpoint_registry"), OBSERVER( + "observer"), POLICY_ELEMENT("policy_element"); - static IdentityRequest idReq = new IdentityRequest(); - static IdentityResponse idRsp = new IdentityResponse(); - static EndpointDeclareRequest epDeclReq = new EndpointDeclareRequest(); - static EndpointDeclareResponse epDeclRsp = new EndpointDeclareResponse(); - static EndpointUndeclareRequest epUndeclReq = new EndpointUndeclareRequest(); - static EndpointResolveRequest epReqReq = new EndpointResolveRequest(); - static EndpointResolveResponse epReqRsp = new EndpointResolveResponse(); - static EndpointUnresolveRequest epUnreqReq = new EndpointUnresolveRequest(); - static EndpointUnresolveResponse epUnreqRsp = new EndpointUnresolveResponse(); - static EndpointUpdateRequest epPolUpdReq = new EndpointUpdateRequest(); - static EndpointUpdateResponse epPolUpdRsp = new EndpointUpdateResponse(); - static PolicyResolveRequest polReq = new PolicyResolveRequest(); - static PolicyResolveResponse polRsp = new PolicyResolveResponse(); - static PolicyUpdateRequest polUpdReq = new PolicyUpdateRequest(); - static PolicyUpdateResponse polUpdRsp = new PolicyUpdateResponse(); - static PolicyUnresolveRequest polUnReq = new PolicyUnresolveRequest(); - static PolicyUnresolveResponse polUnRsp = new PolicyUnresolveResponse(); + static final IdentityRequest idReq = new IdentityRequest(); + static final IdentityResponse idRsp = new IdentityResponse(); + static final EndpointDeclareRequest epDeclReq = new EndpointDeclareRequest(); + static final EndpointDeclareResponse epDeclRsp = new EndpointDeclareResponse(); + static final EndpointUndeclareRequest epUndeclReq = new EndpointUndeclareRequest(); + static final EndpointResolveRequest epReqReq = new EndpointResolveRequest(); + static final EndpointResolveResponse epReqRsp = new EndpointResolveResponse(); + static final EndpointUnresolveRequest epUnreqReq = new EndpointUnresolveRequest(); + static final EndpointUnresolveResponse epUnreqRsp = new EndpointUnresolveResponse(); + static final EndpointUpdateRequest epPolUpdReq = new EndpointUpdateRequest(); + static final EndpointUpdateResponse epPolUpdRsp = new EndpointUpdateResponse(); + static final PolicyResolveRequest polReq = new PolicyResolveRequest(); + static final PolicyResolveResponse polRsp = new PolicyResolveResponse(); + static final PolicyUpdateRequest polUpdReq = new PolicyUpdateRequest(); + static final PolicyUpdateResponse polUpdRsp = new PolicyUpdateResponse(); + static final PolicyUnresolveRequest polUnReq = new PolicyUnresolveRequest(); + static final PolicyUnresolveResponse polUnRsp = new PolicyUnresolveResponse(); private final String role; @@ -79,8 +75,7 @@ public enum Role { msgList.add(idReq); msgList.add(idRsp); return msgList; - } - else if (role.equals(POLICY_REPOSITORY.toString())) { + } else if (role.equals(POLICY_REPOSITORY.toString())) { List msgList = new ArrayList(); msgList.add(polReq); msgList.add(polUpdReq); @@ -88,8 +83,7 @@ public enum Role { msgList.add(polUnReq); msgList.add(polUnRsp); return msgList; - } - else if (role.equals(ENDPOINT_REGISTRY.toString())) { + } else if (role.equals(ENDPOINT_REGISTRY.toString())) { List msgList = new ArrayList(); msgList.add(epDeclReq); msgList.add(epUndeclReq); @@ -98,8 +92,7 @@ public enum Role { msgList.add(epPolUpdReq); msgList.add(epPolUpdRsp); return msgList; - } - else if (role.equals(OBSERVER.toString())) { + } else if (role.equals(OBSERVER.toString())) { List msgList = new ArrayList(); return msgList; } @@ -110,4 +103,4 @@ public enum Role { public String toString() { return this.role; } -} \ No newline at end of file +}