return itemId instanceof OnapPDPGroup;
}
+ /**
+ * refreshGroups.
+ */
public synchronized void refreshGroups() {
synchronized (this.groups) {
this.groups.clear();
return Collections.unmodifiableList(this.groups);
}
+ /**
+ * makeDefault.
+ *
+ * @param group OnapPDPGroup
+ */
public void makeDefault(OnapPDPGroup group) {
try {
this.papEngine.setDefaultGroup(group);
return;
}
+ /**
+ * removeGroup.
+ *
+ * @param group OnapPDPGroup
+ * @param newGroup OnapPDPGroup
+ * @throws PAPException PAPException
+ */
public void removeGroup(OnapPDPGroup group, OnapPDPGroup newGroup) throws PAPException {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("removeGroup: " + group + " new group for PDPs: " + newGroup);
}
}
+ /**
+ * removePDP.
+ *
+ * @param pdp OnapPDP
+ * @param group OnapPDPGroup
+ * @throws PAPException PAPException
+ */
public void removePDP(OnapPDP pdp, OnapPDPGroup group) throws PAPException {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("removePDP: " + pdp + " from group: " + group);
}
}
+ /**
+ * updatePDP.
+ *
+ * @param pdp OnapPDP
+ */
public void updatePDP(OnapPDP pdp) {
try {
papEngine.updatePDP(pdp);
}
}
+ /**
+ * updateGroup.
+ *
+ * @param group OnapPDPGroup
+ */
public void updateGroup(OnapPDPGroup group) {
try {
papEngine.updateGroup(group);
return Collections.unmodifiableCollection(items);
}
+ @Override
+ public List<?> getItemIds(int startIndex, int numberOfItems) {
+ synchronized (this.groups) {
+ int endIndex = startIndex + numberOfItems;
+ if (endIndex > this.groups.size()) {
+ endIndex = this.groups.size() - 1;
+ }
+ return this.groups.subList(startIndex, endIndex);
+ }
+ }
+
@Override
public Class<?> getType(Object propertyId) {
if (propertyId.equals(PROPERTY_ID)) {
throw new UnsupportedOperationException("PDP Container cannot add a given item.");
}
+ /**
+ * addNewGroup.
+ *
+ * @param name String
+ * @param description String
+ * @throws PAPException PAPException
+ */
public void addNewGroup(String name, String description) throws PAPException {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("addNewGroup " + name + " " + description);
this.papEngine.newGroup(name, description);
}
+ /**
+ * addNewPDP.
+ *
+ * @param id String
+ * @param group OnapPDPGroup
+ * @param name String
+ * @param description String
+ * @param jmxport int
+ * @throws PAPException PAPException
+ */
public void addNewPDP(String id, OnapPDPGroup group, String name, String description, int jmxport)
throws PAPException {
if (LOGGER.isTraceEnabled()) {
this.papEngine.newPDP(id, group, name, description, jmxport);
}
+ /**
+ * movePDP.
+ *
+ * @param pdp OnapPDP
+ * @param group OnapPDPGroup
+ */
public void movePDP(OnapPDP pdp, OnapPDPGroup group) {
try {
this.papEngine.movePDP(pdp, group);
return this.groups.get(index);
}
- @Override
- public List<?> getItemIds(int startIndex, int numberOfItems) {
- synchronized (this.groups) {
- int endIndex = startIndex + numberOfItems;
- if (endIndex > this.groups.size()) {
- endIndex = this.groups.size() - 1;
- }
- return this.groups.subList(startIndex, endIndex);
- }
- }
-
@Override
public Object addItemAt(int index) {
throw new UnsupportedOperationException("Cannot addItemAt");