mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
api: Extend or Implement InternalIdentity's getId method on a lot of VOs and Interfaces
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
a157a4c1eb
commit
a5dddb4a83
@ -19,12 +19,13 @@ package com.cloud.domain;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.user.OwnedBy;
|
import com.cloud.user.OwnedBy;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Domain defines the Domain object.
|
* Domain defines the Domain object.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface Domain extends OwnedBy {
|
public interface Domain extends OwnedBy, InternalIdentity {
|
||||||
public static final long ROOT_DOMAIN = 1L;
|
public static final long ROOT_DOMAIN = 1L;
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.event;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Event extends ControlledEntity{
|
public interface Event extends ControlledEntity, InternalIdentity {
|
||||||
public enum State {
|
public enum State {
|
||||||
Created,
|
Created,
|
||||||
Scheduled,
|
Scheduled,
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import com.cloud.utils.net.Ip;
|
import com.cloud.utils.net.Ip;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -32,7 +33,7 @@ import com.cloud.utils.net.Ip;
|
|||||||
* - DomainId = domain of the account owner.
|
* - DomainId = domain of the account owner.
|
||||||
* - Allocated = time it was allocated.
|
* - Allocated = time it was allocated.
|
||||||
*/
|
*/
|
||||||
public interface IpAddress extends ControlledEntity {
|
public interface IpAddress extends ControlledEntity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet.
|
Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet.
|
||||||
Allocated, // The IP address is in used.
|
Allocated, // The IP address is in used.
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import com.cloud.network.Networks.Mode;
|
|||||||
import com.cloud.network.Networks.TrafficType;
|
import com.cloud.network.Networks.TrafficType;
|
||||||
import com.cloud.utils.fsm.FiniteState;
|
import com.cloud.utils.fsm.FiniteState;
|
||||||
import com.cloud.utils.fsm.StateMachine;
|
import com.cloud.utils.fsm.StateMachine;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -31,7 +32,7 @@ import java.util.Set;
|
|||||||
/**
|
/**
|
||||||
* owned by an account.
|
* owned by an account.
|
||||||
*/
|
*/
|
||||||
public interface Network extends ControlledEntity {
|
public interface Network extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
public enum GuestType {
|
public enum GuestType {
|
||||||
Shared,
|
Shared,
|
||||||
|
|||||||
@ -16,12 +16,14 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface PhysicalNetwork {
|
public interface PhysicalNetwork extends InternalIdentity {
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
Disabled,
|
Disabled,
|
||||||
|
|||||||
@ -18,10 +18,11 @@ package com.cloud.network;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import com.cloud.dc.Vlan;
|
import com.cloud.dc.Vlan;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan {
|
public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan, InternalIdentity {
|
||||||
|
|
||||||
String getMacAddress();
|
String getMacAddress();
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.network;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteCustomerGateway extends ControlledEntity {
|
public interface Site2SiteCustomerGateway extends ControlledEntity, InternalIdentity {
|
||||||
public long getId();
|
public long getId();
|
||||||
public String getUuid();
|
public String getUuid();
|
||||||
public String getGatewayIp();
|
public String getGatewayIp();
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.network;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteVpnConnection extends ControlledEntity {
|
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Pending,
|
Pending,
|
||||||
Connected,
|
Connected,
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.network;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Site2SiteVpnGateway extends ControlledEntity {
|
public interface Site2SiteVpnGateway extends ControlledEntity, InternalIdentity {
|
||||||
public long getId();
|
public long getId();
|
||||||
public String getUuid();
|
public String getUuid();
|
||||||
public long getAddrId();
|
public long getAddrId();
|
||||||
|
|||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.network;
|
package com.cloud.network;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface VpnUser extends ControlledEntity {
|
public interface VpnUser extends ControlledEntity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Add,
|
Add,
|
||||||
Revoke,
|
Revoke,
|
||||||
|
|||||||
@ -18,8 +18,9 @@
|
|||||||
package com.cloud.network.as;
|
package com.cloud.network.as;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface AutoScalePolicy extends ControlledEntity {
|
public interface AutoScalePolicy extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
long getId();
|
long getId();
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,10 @@
|
|||||||
package com.cloud.network.as;
|
package com.cloud.network.as;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
|
||||||
public interface AutoScaleVmGroup extends ControlledEntity {
|
public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
String State_New = "new";
|
String State_New = "new";
|
||||||
String State_Revoke = "revoke";
|
String State_Revoke = "revoke";
|
||||||
|
|||||||
@ -21,11 +21,12 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import com.cloud.utils.Pair;
|
import com.cloud.utils.Pair;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AutoScaleVmProfile
|
* AutoScaleVmProfile
|
||||||
*/
|
*/
|
||||||
public interface AutoScaleVmProfile extends ControlledEntity {
|
public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
public long getId();
|
public long getId();
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,9 @@
|
|||||||
package com.cloud.network.as;
|
package com.cloud.network.as;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Condition extends ControlledEntity {
|
public interface Condition extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
static enum Operator {
|
static enum Operator {
|
||||||
EQ, GT, LT, GE, LE
|
EQ, GT, LT, GE, LE
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.network.rules;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface FirewallRule extends ControlledEntity {
|
public interface FirewallRule extends ControlledEntity, InternalIdentity {
|
||||||
enum Purpose {
|
enum Purpose {
|
||||||
Firewall,
|
Firewall,
|
||||||
PortForwarding,
|
PortForwarding,
|
||||||
@ -31,8 +32,8 @@ public interface FirewallRule extends ControlledEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum FirewallRuleType {
|
enum FirewallRuleType {
|
||||||
System, // The pre-defined rules created by admin, in the system wide
|
System, // The pre-defined rules created by admin, in the system wide
|
||||||
User; // the rules created by user, to a specific ip
|
User // the rules created by user, to a specific ip
|
||||||
}
|
}
|
||||||
|
|
||||||
enum State {
|
enum State {
|
||||||
|
|||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.network.rules;
|
package com.cloud.network.rules;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface StaticNatRule extends ControlledEntity, FirewallRule {
|
public interface StaticNatRule extends ControlledEntity, InternalIdentity, FirewallRule {
|
||||||
|
|
||||||
long getId();
|
long getId();
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,10 @@
|
|||||||
package com.cloud.network.security;
|
package com.cloud.network.security;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
//FIXME: Annotation @doc("")
|
//FIXME: Annotation @doc("")
|
||||||
public interface SecurityGroup extends ControlledEntity {
|
public interface SecurityGroup extends ControlledEntity, InternalIdentity {
|
||||||
long getId();
|
long getId();
|
||||||
|
|
||||||
String getUuid();
|
String getUuid();
|
||||||
|
|||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.network.vpc;
|
package com.cloud.network.vpc;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface StaticRoute extends ControlledEntity{
|
public interface StaticRoute extends ControlledEntity, InternalIdentity {
|
||||||
enum State {
|
enum State {
|
||||||
Staged, // route been created but has never got through network rule conflict detection. Routes in this state can not be sent to VPC virtual router.
|
Staged, // route been created but has never got through network rule conflict detection. Routes in this state can not be sent to VPC virtual router.
|
||||||
Add, // Add means the route has been created and has gone through network rule conflict detection.
|
Add, // Add means the route has been created and has gone through network rule conflict detection.
|
||||||
|
|||||||
@ -18,8 +18,9 @@ package com.cloud.network.vpc;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import com.cloud.network.Network;
|
import com.cloud.network.Network;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Vpc extends ControlledEntity{
|
public interface Vpc extends ControlledEntity, InternalIdentity{
|
||||||
public enum State {
|
public enum State {
|
||||||
Enabled,
|
Enabled,
|
||||||
Inactive
|
Inactive
|
||||||
|
|||||||
@ -18,8 +18,9 @@ package com.cloud.network.vpc;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import org.apache.cloudstack.api.Identity;
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface VpcGateway extends Identity, ControlledEntity {
|
public interface VpcGateway extends Identity, ControlledEntity, InternalIdentity {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
Private,
|
Private,
|
||||||
Public,
|
Public,
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.projects;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface ProjectInvitation extends ControlledEntity {
|
public interface ProjectInvitation extends ControlledEntity, InternalIdentity {
|
||||||
public enum State {
|
public enum State {
|
||||||
Pending, Completed, Expired, Declined
|
Pending, Completed, Expired, Declined
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.server;
|
package com.cloud.server;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface ResourceTag extends ControlledEntity{
|
public interface ResourceTag extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
public enum TaggedResourceType {
|
public enum TaggedResourceType {
|
||||||
UserVm,
|
UserVm,
|
||||||
|
|||||||
@ -20,8 +20,9 @@ import java.util.Date;
|
|||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Snapshot extends ControlledEntity {
|
public interface Snapshot extends ControlledEntity, InternalIdentity {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
MANUAL,
|
MANUAL,
|
||||||
RECURRING,
|
RECURRING,
|
||||||
|
|||||||
@ -22,8 +22,9 @@ import com.cloud.acl.ControlledEntity;
|
|||||||
import com.cloud.template.BasedOn;
|
import com.cloud.template.BasedOn;
|
||||||
import com.cloud.utils.fsm.StateMachine2;
|
import com.cloud.utils.fsm.StateMachine2;
|
||||||
import com.cloud.utils.fsm.StateObject;
|
import com.cloud.utils.fsm.StateObject;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Volume extends ControlledEntity, BasedOn, StateObject<Volume.State> {
|
public interface Volume extends ControlledEntity, InternalIdentity, BasedOn, StateObject<Volume.State> {
|
||||||
enum Type {
|
enum Type {
|
||||||
UNKNOWN, ROOT, SWAP, DATADISK, ISO
|
UNKNOWN, ROOT, SWAP, DATADISK, ISO
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,8 +23,9 @@ import com.cloud.acl.ControlledEntity;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.storage.Storage.ImageFormat;
|
import com.cloud.storage.Storage.ImageFormat;
|
||||||
import com.cloud.storage.Storage.TemplateType;
|
import com.cloud.storage.Storage.TemplateType;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface VirtualMachineTemplate extends ControlledEntity {
|
public interface VirtualMachineTemplate extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
public static enum BootloaderType {
|
public static enum BootloaderType {
|
||||||
PyGrub, HVM, External, CD
|
PyGrub, HVM, External, CD
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.user;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface Account extends ControlledEntity {
|
public interface Account extends ControlledEntity, InternalIdentity {
|
||||||
public enum Type {
|
public enum Type {
|
||||||
Normal,
|
Normal,
|
||||||
Admin,
|
Admin,
|
||||||
|
|||||||
@ -17,8 +17,9 @@
|
|||||||
package com.cloud.user;
|
package com.cloud.user;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface SSHKeyPair extends ControlledEntity {
|
public interface SSHKeyPair extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The id of the key pair.
|
* @return The id of the key pair.
|
||||||
|
|||||||
@ -16,9 +16,11 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.user;
|
package com.cloud.user;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public interface User extends OwnedBy {
|
public interface User extends OwnedBy, InternalIdentity {
|
||||||
public static final long UID_SYSTEM = 1;
|
public static final long UID_SYSTEM = 1;
|
||||||
|
|
||||||
public long getId();
|
public long getId();
|
||||||
|
|||||||
@ -19,8 +19,9 @@ package com.cloud.vm;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface InstanceGroup extends ControlledEntity {
|
public interface InstanceGroup extends ControlledEntity, InternalIdentity {
|
||||||
long getId();
|
long getId();
|
||||||
|
|
||||||
String getName();
|
String getName();
|
||||||
|
|||||||
@ -24,12 +24,13 @@ import org.apache.cloudstack.api.Identity;
|
|||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.utils.fsm.StateMachine2;
|
import com.cloud.utils.fsm.StateMachine2;
|
||||||
import com.cloud.utils.fsm.StateObject;
|
import com.cloud.utils.fsm.StateObject;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VirtualMachine describes the properties held by a virtual machine
|
* VirtualMachine describes the properties held by a virtual machine
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, StateObject<VirtualMachine.State> {
|
public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, InternalIdentity, StateObject<VirtualMachine.State> {
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
Starting(true, "VM is being started. At this state, you should find host id filled which means it's being started on that host."),
|
Starting(true, "VM is being started. At this state, you should find host id filled which means it's being started on that host."),
|
||||||
|
|||||||
@ -18,5 +18,4 @@ package org.apache.cloudstack.api;
|
|||||||
|
|
||||||
public interface Identity {
|
public interface Identity {
|
||||||
String getUuid();
|
String getUuid();
|
||||||
long getId();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -557,7 +557,7 @@ public class ApiDispatcher {
|
|||||||
// Invoke the getId method, get the internal long ID
|
// Invoke the getId method, get the internal long ID
|
||||||
// If that fails hide exceptions as the uuid may not exist
|
// If that fails hide exceptions as the uuid may not exist
|
||||||
try {
|
try {
|
||||||
internalId = (Long) ((Identity)objVO).getId();
|
internalId = (Long) ((InternalIdentity)objVO).getId();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
package com.cloud.api.query.vo;
|
package com.cloud.api.query.vo;
|
||||||
|
|
||||||
import com.cloud.acl.ControlledEntity;
|
import com.cloud.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the interface for all VO classes representing DB views created for previous ControlledEntity.
|
* This is the interface for all VO classes representing DB views created for previous ControlledEntity.
|
||||||
@ -24,7 +25,7 @@ import com.cloud.acl.ControlledEntity;
|
|||||||
* @author minc
|
* @author minc
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ControlledViewEntity extends ControlledEntity {
|
public interface ControlledViewEntity extends ControlledEntity, InternalIdentity {
|
||||||
|
|
||||||
public String getDomainPath();
|
public String getDomainPath();
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,9 @@ import com.cloud.network.security.SecurityGroup;
|
|||||||
import com.cloud.network.security.SecurityGroupRules;
|
import com.cloud.network.security.SecurityGroupRules;
|
||||||
import com.cloud.serializer.Param;
|
import com.cloud.serializer.Param;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public class SecurityGroupResultObject implements ControlledEntity{
|
public class SecurityGroupResultObject implements ControlledEntity, InternalIdentity {
|
||||||
@Param(name = "id")
|
@Param(name = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ public class SecurityGroupResultObject implements ControlledEntity{
|
|||||||
this.securityGroupRules = ingressRules;
|
this.securityGroupRules = ingressRules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,15 +24,16 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import com.cloud.user.OwnedBy;
|
import com.cloud.user.OwnedBy;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="account_vlan_map")
|
@Table(name="account_vlan_map")
|
||||||
public class AccountVlanMapVO implements OwnedBy {
|
public class AccountVlanMapVO implements OwnedBy, InternalIdentity {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
@Column(name="id")
|
@Column(name="id")
|
||||||
private Long id;
|
private long id;
|
||||||
|
|
||||||
@Column(name="account_id")
|
@Column(name="account_id")
|
||||||
private long accountId;
|
private long accountId;
|
||||||
@ -49,7 +50,7 @@ public class AccountVlanMapVO implements OwnedBy {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,10 +24,11 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import com.cloud.user.OwnedBy;
|
import com.cloud.user.OwnedBy;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="account_network_ref")
|
@Table(name="account_network_ref")
|
||||||
public class NetworkAccountVO implements OwnedBy {
|
public class NetworkAccountVO implements OwnedBy, InternalIdentity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
long id;
|
long id;
|
||||||
@ -49,7 +50,12 @@ public class NetworkAccountVO implements OwnedBy {
|
|||||||
this.accountId = accountId;
|
this.accountId = accountId;
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getAccountId() {
|
public long getAccountId() {
|
||||||
return accountId;
|
return accountId;
|
||||||
|
|||||||
@ -24,10 +24,11 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import com.cloud.domain.PartOf;
|
import com.cloud.domain.PartOf;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name="domain_network_ref")
|
@Table(name="domain_network_ref")
|
||||||
public class NetworkDomainVO implements PartOf {
|
public class NetworkDomainVO implements PartOf, InternalIdentity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
long id;
|
long id;
|
||||||
@ -49,7 +50,12 @@ public class NetworkDomainVO implements PartOf {
|
|||||||
this.domainId = domainId;
|
this.domainId = domainId;
|
||||||
this.subdomainAccess = subdomainAccess;
|
this.subdomainAccess = subdomainAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user