Thomas Vachuska
Committed by Gerrit Code Review

Fixing javadoc warnings, provided missing package javadocs and corrected group structure.

Change-Id: I2637afe49b81e8e6d10ef3bb0f2a1cf50b2564cc
Showing 28 changed files with 345 additions and 51 deletions
......@@ -23,6 +23,7 @@ import org.onosproject.net.ConnectPoint;
import org.onosproject.xosintegration.VoltTenant;
import org.onosproject.xosintegration.VoltTenantService;
import org.slf4j.Logger;
import java.util.BitSet;
import static org.slf4j.LoggerFactory.getLogger;
......@@ -111,7 +112,9 @@ class StateMachine {
/**
* State Machine Constructor.
* @param sessionId Session Id represented by the switch dpid + port number
*
* @param sessionId session Id represented by the switch dpid + port number
* @param voltService volt service reference
*/
public StateMachine(String sessionId, VoltTenantService voltService) {
log.info("Creating a new state machine for {}", sessionId);
......@@ -122,6 +125,7 @@ class StateMachine {
/**
* Get the client id that is requesting for access.
*
* @return The client id.
*/
public String getSessionId() {
......@@ -154,15 +158,18 @@ class StateMachine {
/**
* Set the challenge identifier and the state issued by the RADIUS.
*
* @param challengeIdentifier The challenge identifier set into the EAP packet from the RADIUS message.
* @param challengeState The challenge state from the RADIUS.
* @param challengeState The challenge state from the RADIUS.
*/
protected void setChallengeInfo(byte challengeIdentifier, byte[] challengeState) {
this.challengeIdentifier = challengeIdentifier;
this.challengeState = challengeState;
}
/**
* Set the challenge identifier issued by the RADIUS on the access challenge request.
*
* @param challengeIdentifier The challenge identifier set into the EAP packet from the RADIUS message.
*/
protected void setChallengeIdentifier(byte challengeIdentifier) {
......@@ -172,6 +179,7 @@ class StateMachine {
/**
* Get the challenge EAP identifier set by the RADIUS.
*
* @return The challenge EAP identifier.
*/
protected byte getChallengeIdentifier() {
......@@ -181,6 +189,7 @@ class StateMachine {
/**
* Set the challenge state info issued by the RADIUS.
*
* @param challengeState The challenge state from the RADIUS.
*/
protected void setChallengeState(byte[] challengeState) {
......@@ -190,6 +199,7 @@ class StateMachine {
/**
* Get the challenge state set by the RADIUS.
*
* @return The challenge state.
*/
protected byte[] getChallengeState() {
......@@ -198,6 +208,7 @@ class StateMachine {
/**
* Set the username.
*
* @param username The username sent to the RADIUS upon access request.
*/
protected void setUsername(byte[] username) {
......@@ -207,6 +218,7 @@ class StateMachine {
/**
* Get the username.
*
* @return The requestAuthenticator.
*/
protected byte[] getReqeustAuthenticator() {
......@@ -215,6 +227,7 @@ class StateMachine {
/**
* Set the username.
*
* @param authenticator The username sent to the RADIUS upon access request.
*/
protected void setRequestAuthenticator(byte[] authenticator) {
......@@ -224,6 +237,7 @@ class StateMachine {
/**
* Get the username.
*
* @return The username.
*/
protected byte[] getUsername() {
......@@ -232,6 +246,7 @@ class StateMachine {
/**
* Return the identifier of the state machine.
*
* @return The state machine identifier.
*/
public byte getIdentifier() {
......@@ -251,15 +266,18 @@ class StateMachine {
/**
* Move to the next state.
*
* @param msg
*/
private void next(int msg) {
private void next(int msg) {
currentState = transition[currentState][msg];
log.info("Current State " + currentState);
}
/**
* Client has requested the start action to allow network access.
*
* @throws StateMachineException if authentication protocol is violated
*/
public void start() throws StateMachineException {
try {
......@@ -275,6 +293,8 @@ class StateMachine {
/**
* An Identification information has been sent by the supplicant.
* Move to the next state if possible.
*
* @throws StateMachineException if authentication protocol is violated
*/
public void requestAccess() throws StateMachineException {
try {
......@@ -289,6 +309,8 @@ class StateMachine {
/**
* RADIUS has accepted the identification.
* Move to the next state if possible.
*
* @throws StateMachineException if authentication protocol is violated
*/
public void authorizeAccess() throws StateMachineException {
try {
......@@ -317,6 +339,8 @@ class StateMachine {
/**
* RADIUS has denied the identification.
* Move to the next state if possible.
*
* @throws StateMachineException if authentication protocol is violated
*/
public void denyAccess() throws StateMachineException {
try {
......@@ -332,6 +356,8 @@ class StateMachine {
/**
* Logoff request has been requested.
* Move to the next state if possible.
*
* @throws StateMachineException if authentication protocol is violated
*/
public void logoff() throws StateMachineException {
try {
......@@ -345,6 +371,7 @@ class StateMachine {
/**
* Get the current state.
*
* @return The current state. Could be STATE_IDLE, STATE_STARTED, STATE_PENDING, STATE_AUTHORIZED,
* STATE_UNAUTHORIZED.
*/
......@@ -353,13 +380,14 @@ class StateMachine {
}
public String toString() {
return ("sessionId: " + this.sessionId) + "\t" + ("identifier: " + this.identifier) + "\t" +
("state: " + this.currentState);
}
}
// FIXME: A source file should contain no more than one top-level entity!
abstract class State {
private final Logger log = getLogger(getClass());
......@@ -368,15 +396,19 @@ abstract class State {
public void start() throws StateMachineInvalidTransitionException {
log.warn("START transition from this state is not allowed.");
}
public void requestAccess() throws StateMachineInvalidTransitionException {
log.warn("REQUEST ACCESS transition from this state is not allowed.");
}
public void radiusAccepted() throws StateMachineInvalidTransitionException {
log.warn("AUTHORIZE ACCESS transition from this state is not allowed.");
}
public void radiusDenied() throws StateMachineInvalidTransitionException {
log.warn("DENY ACCESS transition from this state is not allowed.");
}
public void logoff() throws StateMachineInvalidTransitionException {
log.warn("LOGOFF transition from this state is not allowed.");
}
......@@ -457,6 +489,7 @@ class StateMachineException extends Exception {
}
}
/**
* Exception raised when the transition from one state to another is invalid.
*/
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Prototype application for scanning the flow space for cycles and black holes.
*/
package org.onosproject.flowanalyzer;
\ No newline at end of file
......@@ -59,10 +59,11 @@ public class PolicyHandler {
/**
* Creates a reference.
*
* @param appId segment routing application ID
* @param deviceConfiguration DeviceConfiguration reference
* @param appId segment routing application ID
* @param deviceConfiguration DeviceConfiguration reference
* @param flowObjectiveService FlowObjectiveService reference
* @param policyStore policy store
* @param tunnelHandler tunnel handler reference
* @param policyStore policy store
*/
public PolicyHandler(ApplicationId appId,
DeviceConfiguration deviceConfiguration,
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Segment routing application CLI handlers.
*/
package org.onosproject.segmentrouting.cli;
\ No newline at end of file
......@@ -53,24 +53,24 @@ public interface VirtualPortService {
/**
* Returns the collection of the virtualPorts associated with the networkId.
*
* @param networkId
* @return collection of virtualPort.
* @param networkId network identifier
* @return collection of virtualPort
*/
Collection<VirtualPort> getPorts(TenantNetworkId networkId);
/**
* Returns the collection of the virtualPorts associated with the tenantId.
*
* @param tenantId
* @return collection of virtualPort.
* @param tenantId tenant identifier
* @return collection of virtualPort
*/
Collection<VirtualPort> getPorts(TenantId tenantId);
/**
* Returns the collection of the virtualPorts associated with the deviceId.
*
* @param deviceId
* @return collection of virtualPort.
* @param deviceId device identifier
* @return collection of virtualPort
*/
Collection<VirtualPort> getPorts(DeviceId deviceId);
......@@ -86,7 +86,7 @@ public interface VirtualPortService {
* Updates virtualPorts by virtualPorts.
*
* @param virtualPorts the iterable collection of virtualPorts
* @return true if all given identifiers updated successfully.
* @return true if all given identifiers updated successfully
*/
boolean updatePorts(Iterable<VirtualPort> virtualPorts);
......@@ -95,7 +95,7 @@ public interface VirtualPortService {
*
* @param virtualPortIds the iterable collection of virtualPort identifiers
* @return true or false if one with the given identifier to delete is
* successfully.
* successfully
*/
boolean removePorts(Iterable<VirtualPortId> virtualPortIds);
}
......
......@@ -63,7 +63,7 @@ public interface BridgeConfig extends HandlerBehaviour {
/**
* Delete a logical/virtual port.
*
* return collection of port
* @return collection of port
*/
Collection<PortDescription> getPorts();
}
......
......@@ -25,30 +25,30 @@ import org.onosproject.net.driver.HandlerBehaviour;
public interface TunnelConfig extends HandlerBehaviour {
/**
* Create a tunnel.
* Creates a tunnel on this device.
*
* @param tunnel tunnel entity
* @param tunnel tunnel descriptor
*/
void createTunnel(TunnelDescription tunnel);
/**
* Remove a tunnel.
* Removes a tunnel on this device.
*
* @param tunnel tunnel entity
* @param tunnel tunnel descriptor
*/
void removeTunnel(TunnelDescription tunnel);
/**
* Update a tunnel.
* Updates a tunnel on this device.
*
* @param tunnel tunnel entity
* @param tunnel tunnel descriptor
*/
void updateTunnel(TunnelDescription tunnel);
/**
* Gets tunnels.
* Returns tunnels created on this device.
*
* return collection of tunnel
* @return collection of tunnels
*/
Collection<TunnelDescription> getTunnels();
......
......@@ -37,7 +37,8 @@ public class DefaultDriverData implements DriverData {
/**
* Creates new driver data.
*
* @param driver parent driver type
* @param driver parent driver type
* @param deviceId device identifier
*/
public DefaultDriverData(Driver driver, DeviceId deviceId) {
this.driver = driver;
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Flow meter model and related services.
*/
package org.onosproject.net.meter;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Generic network resource model and services for resource allocation and
* resource tracking.
*/
package org.onosproject.net.newresource;
\ No newline at end of file
......@@ -72,7 +72,7 @@ public final class UiExtension {
* @return JavaScript inclusion statements
*/
public InputStream js() {
return getStream(resourcePath + JS_HTML);
return getStream(resourcePath + JS_HTML);
}
/**
......@@ -141,7 +141,8 @@ public final class UiExtension {
* Views defaults to an empty list.
* Both Message and TopoOverlay factories default to null.
*
* @param cl the classloader
* @param cl the class loader
* @param views list of views contributed by this extension
*/
public Builder(ClassLoader cl, List<UiView> views) {
checkNotNull(cl, "Must provide a class loader");
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Mechanism for dynamically extending topology view with information and
* behaviour overlays.
*/
package org.onosproject.ui.topo;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Prototype of a composition mechanism for flow objective composition.
*/
package org.onosproject.net.flowobjective.impl.composition;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of the generic network resource subsystem.
*/
package org.onosproject.net.newresource.impl;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of the network resource distributed store.
*/
package org.onosproject.store.newresource.impl;
\ No newline at end of file
......@@ -49,7 +49,7 @@
<version>2.10.1</version>
<configuration>
<show>package</show>
<excludePackageNames>org.onlab.thirdparty:*.impl:*.impl.*:org.onosproject.provider.*:org.onosproject.rest:org.onosproject.cli*:org.onosproject.tvue:org.onosproject.foo:org.onosproject.mobility:org.onosproject.proxyarp:org.onosproject.fwd:org.onosproject.ifwd:org.onosproject.optical:org.onosproject.config:org.onosproject.calendar:org.onosproject.sdnip*:org.onosproject.oecfg:org.onosproject.metrics:org.onosproject.store.*:org.onosproject.openflow.*:org.onosproject.common.*:org.onosproject.net.group.impl:org.onosproject.routing*:org.onosproject.bgprouter:org.onosproject.intentperf:org.onosproject.maven:org.onosproject.cordfabric*:org.onosproject.driver*:org.onosproject.segmentrouting*:org.onosproject.reactive*:org.onosproject.distributedprimitives*:org.onosproject.messagingperf*.org.onosproject.virtualbng*.org.onosproject.election*:org.onosproject.demo*:org.onlab.jdvue*:org.onlab.stc*:org.onosproject.xosintegration*</excludePackageNames>
<excludePackageNames>org.onlab.thirdparty:*.impl:*.impl.*:org.onosproject.provider.*:org.onosproject.rest:org.onosproject.cli*:org.onosproject.tvue:org.onosproject.foo:org.onosproject.mobility:org.onosproject.proxyarp:org.onosproject.fwd:org.onosproject.ifwd:org.onosproject.optical:org.onosproject.config:org.onosproject.calendar:org.onosproject.sdnip*:org.onosproject.oecfg:org.onosproject.metrics:org.onosproject.store.*:org.onosproject.openflow.*:org.onosproject.common.*:org.onosproject.net.group.impl:org.onosproject.routing*:org.onosproject.bgprouter:org.onosproject.intentperf:org.onosproject.maven:org.onosproject.cordfabric*:org.onosproject.driver*:org.onosproject.segmentrouting*:org.onosproject.reactive*:org.onosproject.distributedprimitives*:org.onosproject.messagingperf*.org.onosproject.virtualbng*.org.onosproject.election*:org.onosproject.demo*:org.onlab.jdvue*:org.onlab.stc*:org.onosproject.xosintegration*:org.onosproject.app.vtn*:org.onosproject.ovsdb*:org.onosproject.aaa:org.onosproject.acl*:org.onosproject.flowanalyzer</excludePackageNames>
<docfilessubdirs>true</docfilessubdirs>
<doctitle>ONOS Java API (1.3.0-SNAPSHOT)</doctitle>
<groups>
......
......@@ -67,7 +67,7 @@
<group>
<title>Core Subsystems</title>
<packages>
org.onosproject.impl:org.onosproject.core.impl:org.onosproject.cluster.impl:org.onosproject.net.device.impl:org.onosproject.net.link.impl:org.onosproject.net.host.impl:org.onosproject.net.topology.impl:org.onosproject.net.packet.impl:org.onosproject.net.flow.impl:org.onosproject.net.*.impl:org.onosproject.event.impl:org.onosproject.net.intent.impl*:org.onosproject.net.proxyarp.impl:org.onosproject.mastership.impl:org.onosproject.net.resource.impl:org.onosproject.json:org.onosproject.json.*:org.onosproject.provider.host.impl:org.onosproject.provider.lldp.impl:org.onosproject.net.statistic.impl:org.onosproject.app.impl:org.onosproject.common.*:org.onosproject.net.group.impl:org.onosproject.cfg.impl:org.onosproject.net.driver.impl:org.onosproject.net.flowobjective.impl:org.onosproject.net.flowext.impl:org.onosproject.net.tunnel.impl:org.onosproject.security.*
org.onosproject.impl:org.onosproject.core.impl:org.onosproject.cluster.impl:org.onosproject.net.device.impl:org.onosproject.net.link.impl:org.onosproject.net.host.impl:org.onosproject.net.topology.impl:org.onosproject.net.packet.impl:org.onosproject.net.flow.impl:org.onosproject.net.*.impl:org.onosproject.event.impl:org.onosproject.net.intent.impl*:org.onosproject.net.proxyarp.impl:org.onosproject.mastership.impl:org.onosproject.net.resource.impl:org.onosproject.net.newresource.impl:org.onosproject.json:org.onosproject.json.*:org.onosproject.provider.host.impl:org.onosproject.provider.lldp.impl:org.onosproject.net.statistic.impl:org.onosproject.app.impl:org.onosproject.common.*:org.onosproject.net.group.impl:org.onosproject.cfg.impl:org.onosproject.net.driver.impl:org.onosproject.net.flowobjective.impl*:org.onosproject.net.flowext.impl:org.onosproject.net.tunnel.impl:org.onosproject.security.*
</packages>
</group>
<group>
......@@ -79,7 +79,7 @@
<group>
<title>Incubator for Core Subsystems &amp; Distributed Stores</title>
<packages>
org.onosproject.incubator.net.impl:org.onosproject.incubator.store.impl:org.onosproject.incubator.net.resource.label.impl:org.onosproject.incubator.store.resource.impl:org.onosproject.incubator.net.tunnel.impl:org.onosproject.incubator.store.tunnel.impl
org.onosproject.incubator.net.impl:org.onosproject.incubator.store.impl:org.onosproject.incubator.net.resource.label.impl:org.onosproject.incubator.store.resource.impl:org.onosproject.incubator.net.tunnel.impl:org.onosproject.incubator.store.tunnel.impl:org.onosproject.incubator.net.config.impl:org.onosproject.incubator.net.domain.impl:org.onosproject.incubator.store.config.impl
</packages>
</group>
<group>
......@@ -95,6 +95,12 @@
</packages>
</group>
<group>
<title>OVSDB Providers</title>
<packages>
org.onosproject.provider.ovsdb*:org.onosproject.ovsdb*
</packages>
</group>
<group>
<title>Other Providers</title>
<packages>
org.onosproject.provider.*
......@@ -119,19 +125,19 @@
</packages>
</group>
<group>
<title>Sample Applications</title>
<title>Builtin Applications</title>
<packages>
org.onosproject.tvue:org.onosproject.fwd:org.onosproject.ifwd:org.onosproject.mobility:org.onosproject.proxyarp:org.onosproject.foo:org.onosproject.calendar:org.onosproject.optical:org.onosproject.optical.*:org.onosproject.sdnip:org.onosproject.sdnip.*:org.onosproject.config:org.onosproject.routing:org.onosproject.routing*:org.onosproject.bgprouter:org.onosproject.intentperf:org.onosproject.segmentrouting:org.onosproject.segmentrouting.*:org.onosproject.reactive.routing*:org.onosproject.messagingperf:org.onosproject.virtualbng:org.onosproject.demo*:org.onosproject.election*:org.onosproject.distributedprimitives*:org.onosproject.cordfabric*:org.onosproject.xosintegration*:org.onosproject.pcep*
org.onosproject.app.*:org.onosproject.acl*:org.onosproject.aaa:org.onosproject.fwd:org.onosproject.flowanalyzer:org.onosproject.mobility:org.onosproject.proxyarp:org.onosproject.calendar:org.onosproject.optical:org.onosproject.optical.*:org.onosproject.sdnip:org.onosproject.sdnip.*:org.onosproject.config:org.onosproject.routing:org.onosproject.routing*:org.onosproject.bgprouter:org.onosproject.segmentrouting:org.onosproject.segmentrouting.*:org.onosproject.reactive.routing*:org.onosproject.messagingperf:org.onosproject.virtualbng:org.onosproject.cordfabric*:org.onosproject.xosintegration*:org.onosproject.pcep*
</packages>
</group>
<group>
<title>Test Instrumentation</title>
<title>Test Instrumentation &amp; Applications</title>
<packages>
org.onosproject.metrics.*
org.onosproject.metrics.*:org.onosproject.demo*:org.onosproject.election*:org.onosproject.distributedprimitives*:org.onosproject.intentperf*:org.onosproject.messagingperf*:org.onosproject.optical.testapp*
</packages>
</group>
</groups>
<excludePackageNames>org.onlab.thirdparty:org.onosproject.oecfg:org.onosproject.maven:org.onlab.jdvue*</excludePackageNames>
<excludePackageNames>org.onlab.thirdparty:org.onosproject.oecfg:org.onosproject.maven:org.onlab.jdvue*:org.onlab.stc*</excludePackageNames>
</configuration>
</plugin>
</plugins>
......
......@@ -243,6 +243,7 @@ public abstract class Config<S> {
* @param name property name
* @param defaultValue default value if property not set
* @param enumClass the enum class
* @param <E> type of enum
* @return property value or default value
*/
protected <E extends Enum<E>> E get(String name, E defaultValue, Class<E> enumClass) {
......@@ -254,6 +255,7 @@ public abstract class Config<S> {
*
* @param name property name
* @param value new value or null to clear the property
* @param <E> type of enum
* @return self
*/
protected <E extends Enum> Config<S> setOrClear(String name, E value) {
......@@ -268,9 +270,9 @@ public abstract class Config<S> {
/**
* Gets the specified array property as a list of items.
*
* @param name property name
* @param name property name
* @param function mapper from string to item
* @param <T> type of item
* @param <T> type of item
* @return list of items
*/
protected <T> List<T> getList(String name, Function<String, T> function) {
......@@ -284,9 +286,9 @@ public abstract class Config<S> {
* Sets the specified property as an array of items in a given collection or
* clears it if null is given.
*
* @param name propertyName
* @param name propertyName
* @param collection collection of items
* @param <T> type of items
* @param <T> type of items
* @return self
*/
protected <T> Config<S> setOrClear(String name, Collection<T> collection) {
......
......@@ -28,7 +28,7 @@ import java.util.Set;
*/
@Beta
public interface NetworkConfigService
extends ListenerService<NetworkConfigEvent, NetworkConfigListener> {
extends ListenerService<NetworkConfigEvent, NetworkConfigListener> {
/**
* Returns the set of subject classes for which configuration may be
......@@ -57,7 +57,8 @@ public interface NetworkConfigService
/**
* Returns the configuration class with the specified key.
*
* @param configKey subject class name
* @param subjectKey subject class key
* @param configKey subject class name
* @return subject class
*/
Class<? extends Config> getConfigClass(String subjectKey, String configKey);
......
......@@ -44,7 +44,7 @@ public interface NetworkConfigStore extends Store<NetworkConfigEvent, NetworkCon
*
* @param configClass configuration class
* @param <S> type of subject
* @param <C> type of configuration
* @param <C> type of configuration
* @return configuration factory or null
*/
<S, C extends Config<S>> ConfigFactory<S, C> getConfigFactory(Class<C> configClass);
......@@ -112,6 +112,7 @@ public interface NetworkConfigStore extends Store<NetworkConfigEvent, NetworkCon
* @param json raw JSON node containing the configuration data
* @param <S> type of subject
* @param <C> type of configuration
* @return configuration object
*/
<S, C extends Config<S>> C applyConfig(S subject, Class<C> configClass,
ObjectNode json);
......
......@@ -67,8 +67,9 @@ public abstract class SubjectFactory<S> {
/**
* Creates a configuration subject from its key image.
*
* @param subjectKey subject class key
* @return configuration subject
*/
public abstract S createSubject(String key);
public abstract S createSubject(String subjectKey);
}
......
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Various basic builtin network configurations.
*/
package org.onosproject.incubator.net.config.basics;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of the network configuration subsystem.
*/
package org.onosproject.incubator.net.config.impl;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of the intent domain subsystem.
*/
package org.onosproject.incubator.net.domain.impl;
\ No newline at end of file
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implementation of the network configuration distributed store.
*/
package org.onosproject.incubator.store.config.impl;
\ No newline at end of file
......@@ -88,7 +88,7 @@ public class EAP extends BasePacket {
/**
* Sets the EAP identifier.
*
* @param identifier
* @param identifier EAP identifier
* @return this
*/
public EAP setIdentifier(final byte identifier) {
......
......@@ -389,6 +389,7 @@ public abstract class Tools {
/**
* Returns the future value when complete or if future
* completes exceptionally returns the defaultValue.
*
* @param future future
* @param defaultValue default value
* @param <T> future value type
......@@ -409,6 +410,7 @@ public abstract class Tools {
/**
* Returns the future value when complete or if future
* completes exceptionally returns the defaultValue.
*
* @param future future
* @param timeout time to wait for successful completion
* @param timeUnit time unit
......@@ -433,6 +435,7 @@ public abstract class Tools {
/**
* Returns a future that is completed exceptionally.
*
* @param t exception
* @param <T> future value type
* @return future
......@@ -448,6 +451,7 @@ public abstract class Tools {
* <p>
* WARNING: There is a performance cost due to array copy
* when using this method.
*
* @param buffer byte buffer
* @return byte array containing the byte buffer contents
*/
......@@ -463,10 +467,11 @@ public abstract class Tools {
}
/**
* Converts an Iterable to a Stream.
* Converts an iterable to a stream.
*
* @param it Iterable to convert
* @return Iterable as a Stream
* @param it iterable to convert
* @param <T> type if item
* @return iterable as a stream
*/
public static <T> Stream<T> stream(Iterable<T> it) {
return StreamSupport.stream(it.spliterator(), false);
......
......@@ -129,7 +129,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
* Uploads network configuration in bulk.
*
* @param request network configuration JSON rooted at the top node
* @throws IOException
* @throws IOException if unable to parse the request
* @return empty response
*/
@POST
......@@ -150,7 +150,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
* @param subjectKey subject class key
* @param request network configuration JSON rooted at the top node
* @return empty response
* @throws IOException
* @throws IOException if unable to parse the request
*/
@POST
@Path("{subjectKey}")
......@@ -171,7 +171,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
* @param subject subject key
* @param request network configuration JSON rooted at the top node
* @return empty response
* @throws IOException
* @throws IOException if unable to parse the request
*/
@POST
@Path("{subjectKey}/{subject}")
......@@ -197,7 +197,7 @@ public class NetworkConfigWebResource extends AbstractWebResource {
* @param configKey configuration class key
* @param request network configuration JSON rooted at the top node
* @return empty response
* @throws IOException
* @throws IOException if unable to parse the request
*/
@POST
@Path("{subjectKey}/{subject}/{configKey}")
......