Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.appdef.server.session
Class ServiceManagerEJBImpl

java.lang.Object
  extended by org.hyperic.hq.appdef.server.session.AppdefSessionUtil
      extended by org.hyperic.hq.appdef.server.session.AppdefSessionEJB
          extended by org.hyperic.hq.appdef.server.session.ServiceManagerEJBImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ServiceManagerEJBImpl
extends AppdefSessionEJB
implements javax.ejb.SessionBean

This class is responsible for managing Server objects in appdef and their relationships

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB
_ctx, _ic
 
Constructor Summary
ServiceManagerEJBImpl()
           
 
Method Summary
 Service createService(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer serviceTypeId, java.lang.String name, java.lang.String desc, java.lang.String location)
          Create a Service which runs on a given server
 Service createService(AuthzSubject subject, Server server, ServiceType type, java.lang.String name, java.lang.String desc, java.lang.String location, Service parent)
           
 void deleteServiceType(ServiceType serviceType, AuthzSubject overlord, org.hyperic.hq.authz.shared.ResourceGroupManagerLocal resGroupMan, org.hyperic.hq.authz.shared.ResourceManagerLocal resMan)
           
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 java.util.Collection findDeletedServices()
           
 java.util.List findPlatformServicesByType(Platform p, ServiceType st)
          Get platform service POJOs
 Service findServiceById(java.lang.Integer id)
          Find Service by Id.
 java.util.List findServicesById(AuthzSubject subject, java.lang.Integer[] serviceIds)
           
 java.util.List findServicesByType(Server server, ServiceType st)
          Get Services which are children of the server, and of the specified type.
 ServiceType findServiceType(java.lang.Integer id)
          Find a ServiceType by id
 ServiceType findServiceTypeByName(java.lang.String name)
          Find service type by name
 PageList findVirtualServiceTypesByPlatform(AuthzSubject subject, java.lang.Integer platformId)
           
 PageList getAllClusterAppUnassignedServices(AuthzSubject subject, PageControl pc)
          Fetch all services that haven't been assigned to a cluster and that haven't been assigned to any applications.
 PageList getAllServices(AuthzSubject subject, PageControl pc)
           
 PageList getAllServiceTypes(AuthzSubject subject, PageControl pc)
           
 java.lang.Integer[] getFlattenedServiceIdsByApplication(AuthzSubject subject, java.lang.Integer appId)
          Get all service inventory by application, including those inside an associated cluster
 PageList getFlattenedServicesByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer typeId, PageControl pc)
          Get all services by application.
 java.util.Map getMappedPlatformServices(AuthzSubject subject, java.lang.Integer platId, PageControl pc)
          Get platform services (children of virtual servers), mapped by type id of a specified type
static org.hyperic.hq.appdef.shared.ServiceManagerLocal getOne()
           
 java.util.Collection getPlatformServices(AuthzSubject subject, java.lang.Integer platId)
          Get platform service POJOs
 PageList getPlatformServices(AuthzSubject subject, java.lang.Integer platId, java.lang.Integer typeId, PageControl pc)
          Get platform services (children of virtual servers) of a specified type
 PageList getPlatformServices(AuthzSubject subject, java.lang.Integer platId, PageControl pc)
          Get platform services (children of virtual servers)
 Service getServiceById(AuthzSubject subject, java.lang.Integer id)
          Get Service by Id and perform permission check.
 Service getServiceById(java.lang.Integer id)
          Get Service by Id.
 Service getServiceByName(Platform platform, java.lang.String name)
           
 Service getServiceByName(Server server, java.lang.String name)
           
 java.lang.Number getServiceCount()
          Get the # of services within HQ inventory
 java.lang.Integer[] getServiceIds(AuthzSubject subject, java.lang.Integer servTypeId)
          Get service IDs by service type.
 java.lang.Integer[] getServiceIdsByServer(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer svcTypeId)
           
 java.lang.Integer[] getServiceIdsByService(AuthzSubject subject, java.lang.Integer serviceId, java.lang.Integer svcTypeId)
          Get service IDs by service.
 PageList getServiceInventoryByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer svcTypeId, PageControl pc)
           
 PageList getServiceInventoryByApplication(AuthzSubject subject, java.lang.Integer appId, PageControl pc)
           
 java.util.List getServicesByAIID(Server server, java.lang.String aiid)
           
 java.util.List getServicesByApplication(AuthzSubject subject, java.lang.Integer appId)
           
 PageList getServicesByApplication(AuthzSubject subject, java.lang.Integer appId, java.lang.Integer svcTypeId, PageControl pc)
           
 PageList getServicesByApplication(AuthzSubject subject, java.lang.Integer appId, PageControl pc)
           
 PageList getServicesByPlatform(AuthzSubject subject, java.lang.Integer platId, java.lang.Integer svcTypeId, PageControl pc)
          Get services by platform.
 PageList getServicesByPlatform(AuthzSubject subject, java.lang.Integer platId, PageControl pc)
           
 PageList getServicesByServer(AuthzSubject subject, java.lang.Integer serverId, java.lang.Integer svcTypeId, PageControl pc)
           
 PageList getServicesByServer(AuthzSubject subject, java.lang.Integer serverId, PageControl pc)
          Get services by server and type.
 java.util.List getServicesByServer(AuthzSubject subject, Server server)
          Get service POJOs by server and type.
 PageList getServicesByService(AuthzSubject subject, java.lang.Integer serviceId, java.lang.Integer svcTypeId, PageControl pc)
          Get services by server.
 PageList getServicesByService(AuthzSubject subject, java.lang.Integer serviceId, PageControl pc)
           
 java.util.List getServicesByType(AuthzSubject subject, java.lang.String svcName, boolean asc)
           
 java.util.List getServiceTypeCounts()
          Returns a list of 2 element arrays.
 PageList getServiceTypesByServerType(AuthzSubject subject, int serverTypeId)
           
 PageList getViewableServiceTypes(AuthzSubject subject, PageControl pc)
           
 void handleResourceDelete(Resource resource)
           
 void moveService(AuthzSubject subject, Service target, Platform destination)
          Move a Service from one Platform to another.
 void moveService(AuthzSubject subject, Service target, Server destination)
          Move a Service from one Server to another.
 void removeService(AuthzSubject subject, Service service)
          A removeService method that takes a ServiceLocal.
 Service updateService(AuthzSubject subject, ServiceValue existing)
           
 void updateServiceTypes(java.lang.String plugin, ServiceTypeInfo[] infos)
           
 void updateServiceZombieStatus(AuthzSubject subject, Service svc, boolean zombieStatus)
           
 
Methods inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionEJB
changeOwner, checkAIScanPermission, checkAlertingPermission, checkAlertingScope, checkControlPermission, checkCreateChildPermission, checkCreatePlatformPermission, checkModifyPermission, checkMonitorPermission, checkPermission, checkPermission, checkRemovePermission, checkViewPermission, createAuthzResource, createAuthzResource, deleteCustomProperties, filterResourceTypes, filterViewableServers, getApplicationPrototypeResourceType, getApplicationResourceType, getAuthzResourceType, getGroupResourceType, getInitialContext, getOperationByName, getOverlord, getPlatformPrototypeResourceType, getPlatformResourceType, getResourcePermissions, getResourceType, getRootResourceType, getServerPrototypeResourceType, getServerResourceType, getServiceCluster, getServicePrototypeResourceType, getServiceResourceType, getSessionContext, getViewableApplications, getViewableGroups, getViewablePlatformPKs, getViewablePlatforms, getViewableServers, getViewableServiceInventory, getViewableServices, removeAuthzResource, rollback, setSessionContext
 
Methods inherited from class org.hyperic.hq.appdef.server.session.AppdefSessionUtil
findResourceType, findResourceType, getAgentDAO, getAIQManagerLocal, getApplicationDAO, getApplicationManager, getConfigManager, getConfigResponseDAO, getCPropManager, getPlatformDAO, getPlatformManager, getPlatformTypeDAO, getResourceManager, getServerDAO, getServerManager, getServerTypeDAO, getServiceDAO, getServiceManager, getServiceTypeDAO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.SessionBean
setSessionContext
 

Constructor Detail

ServiceManagerEJBImpl

public ServiceManagerEJBImpl()
Method Detail

createService

public Service createService(AuthzSubject subject,
                             Server server,
                             ServiceType type,
                             java.lang.String name,
                             java.lang.String desc,
                             java.lang.String location,
                             Service parent)
                      throws PermissionException
Throws:
PermissionException

moveService

public void moveService(AuthzSubject subject,
                        Service target,
                        Platform destination)
                 throws VetoException,
                        PermissionException
Move a Service from one Platform to another.

Parameters:
subject - The user initiating the move.
target - The target Service to move.
destination - The destination Platform to move this Service to.
Throws:
PermissionException - If the passed user does not have permission to move the Service.
VetoException - If the operation canot be performed due to incompatible types.

moveService

public void moveService(AuthzSubject subject,
                        Service target,
                        Server destination)
                 throws VetoException,
                        PermissionException
Move a Service from one Server to another.

Parameters:
subject - The user initiating the move.
target - The target Service to move.
destination - The destination Server to move this Service to.
Throws:
PermissionException - If the passed user does not have permission to move the Service.
VetoException - If the operation canot be performed due to incompatible types.

createService

public Service createService(AuthzSubject subject,
                             java.lang.Integer serverId,
                             java.lang.Integer serviceTypeId,
                             java.lang.String name,
                             java.lang.String desc,
                             java.lang.String location)
                      throws javax.ejb.CreateException,
                             ValidationException,
                             PermissionException,
                             ServerNotFoundException,
                             AppdefDuplicateNameException
Create a Service which runs on a given server

Returns:
The service id.
Throws:
javax.ejb.CreateException
ValidationException
PermissionException
ServerNotFoundException
AppdefDuplicateNameException

getServiceIds

public java.lang.Integer[] getServiceIds(AuthzSubject subject,
                                         java.lang.Integer servTypeId)
                                  throws PermissionException
Get service IDs by service type.

Parameters:
subject - The subject trying to list service.
servTypeId - service type id.
Returns:
An array of service IDs.
Throws:
PermissionException

findServicesById

public java.util.List findServicesById(AuthzSubject subject,
                                       java.lang.Integer[] serviceIds)
                                throws ServiceNotFoundException,
                                       PermissionException
Returns:
List of ServiceValue objects
Throws:
ServiceNotFoundException
PermissionException

findServiceById

public Service findServiceById(java.lang.Integer id)
                        throws ServiceNotFoundException
Find Service by Id.

Throws:
ServiceNotFoundException

getServiceById

public Service getServiceById(java.lang.Integer id)
Get Service by Id.

Returns:
The Service identified by this id, or null if it does not exist.

getServiceById

public Service getServiceById(AuthzSubject subject,
                              java.lang.Integer id)
                       throws ServiceNotFoundException,
                              PermissionException
Get Service by Id and perform permission check.

Returns:
The Service identified by this id.
Throws:
ServiceNotFoundException
PermissionException

getServicesByAIID

public java.util.List getServicesByAIID(Server server,
                                        java.lang.String aiid)
Parameters:
server - Server
aiid - service autoinventory identifier
Returns:
List of Service

getServiceByName

public Service getServiceByName(Server server,
                                java.lang.String name)
Parameters:
server - Server
name - corresponds to the EAM_RESOURCE.sort_name column

getServiceByName

public Service getServiceByName(Platform platform,
                                java.lang.String name)

findServiceType

public ServiceType findServiceType(java.lang.Integer id)
                            throws org.hibernate.ObjectNotFoundException
Find a ServiceType by id

Throws:
org.hibernate.ObjectNotFoundException

findServiceTypeByName

public ServiceType findServiceTypeByName(java.lang.String name)
Find service type by name


findDeletedServices

public java.util.Collection findDeletedServices()

getAllServiceTypes

public PageList getAllServiceTypes(AuthzSubject subject,
                                   PageControl pc)
Returns:
PageList of ServiceTypeValues

getViewableServiceTypes

public PageList getViewableServiceTypes(AuthzSubject subject,
                                        PageControl pc)
                                 throws javax.ejb.FinderException,
                                        PermissionException
Returns:
List of ServiceTypeValues
Throws:
javax.ejb.FinderException
PermissionException

getServiceTypesByServerType

public PageList getServiceTypesByServerType(AuthzSubject subject,
                                            int serverTypeId)

findVirtualServiceTypesByPlatform

public PageList findVirtualServiceTypesByPlatform(AuthzSubject subject,
                                                  java.lang.Integer platformId)

getAllServices

public PageList getAllServices(AuthzSubject subject,
                               PageControl pc)
                        throws javax.ejb.FinderException,
                               PermissionException
Returns:
A List of ServiceValue objects representing all of the services that the given subject is allowed to view.
Throws:
javax.ejb.FinderException
PermissionException

getAllClusterAppUnassignedServices

public PageList getAllClusterAppUnassignedServices(AuthzSubject subject,
                                                   PageControl pc)
                                            throws javax.ejb.FinderException,
                                                   PermissionException
Fetch all services that haven't been assigned to a cluster and that haven't been assigned to any applications.

Returns:
A List of ServiceValue objects representing all of the unassigned services that the given subject is allowed to view.
Throws:
javax.ejb.FinderException
PermissionException

getServicesByServer

public PageList getServicesByServer(AuthzSubject subject,
                                    java.lang.Integer serverId,
                                    PageControl pc)
                             throws ServiceNotFoundException,
                                    ServerNotFoundException,
                                    PermissionException
Get services by server and type.

Throws:
ServiceNotFoundException
ServerNotFoundException
PermissionException

getServicesByServer

public PageList getServicesByServer(AuthzSubject subject,
                                    java.lang.Integer serverId,
                                    java.lang.Integer svcTypeId,
                                    PageControl pc)
                             throws ServiceNotFoundException,
                                    PermissionException
Throws:
ServiceNotFoundException
PermissionException

getServicesByServer

public java.util.List getServicesByServer(AuthzSubject subject,
                                          Server server)
                                   throws PermissionException,
                                          ServiceNotFoundException
Get service POJOs by server and type.

Throws:
PermissionException
ServiceNotFoundException

getServiceIdsByServer

public java.lang.Integer[] getServiceIdsByServer(AuthzSubject subject,
                                                 java.lang.Integer serverId,
                                                 java.lang.Integer svcTypeId)
                                          throws ServiceNotFoundException,
                                                 PermissionException
Throws:
ServiceNotFoundException
PermissionException

getServicesByType

public java.util.List getServicesByType(AuthzSubject subject,
                                        java.lang.String svcName,
                                        boolean asc)
                                 throws PermissionException,
                                        InvalidAppdefTypeException
Throws:
PermissionException
InvalidAppdefTypeException

getServicesByService

public PageList getServicesByService(AuthzSubject subject,
                                     java.lang.Integer serviceId,
                                     PageControl pc)
                              throws ServiceNotFoundException,
                                     PermissionException
Throws:
ServiceNotFoundException
PermissionException

getServicesByService

public PageList getServicesByService(AuthzSubject subject,
                                     java.lang.Integer serviceId,
                                     java.lang.Integer svcTypeId,
                                     PageControl pc)
                              throws ServiceNotFoundException,
                                     PermissionException
Get services by server.

Throws:
ServiceNotFoundException
PermissionException

getServiceIdsByService

public java.lang.Integer[] getServiceIdsByService(AuthzSubject subject,
                                                  java.lang.Integer serviceId,
                                                  java.lang.Integer svcTypeId)
                                           throws ServiceNotFoundException,
                                                  PermissionException
Get service IDs by service.

Throws:
ServiceNotFoundException
PermissionException

getServicesByPlatform

public PageList getServicesByPlatform(AuthzSubject subject,
                                      java.lang.Integer platId,
                                      PageControl pc)
                               throws ServiceNotFoundException,
                                      PlatformNotFoundException,
                                      PermissionException
Throws:
ServiceNotFoundException
PlatformNotFoundException
PermissionException

getPlatformServices

public PageList getPlatformServices(AuthzSubject subject,
                                    java.lang.Integer platId,
                                    PageControl pc)
                             throws PlatformNotFoundException,
                                    PermissionException,
                                    ServiceNotFoundException
Get platform services (children of virtual servers)

Throws:
PlatformNotFoundException
PermissionException
ServiceNotFoundException

getPlatformServices

public PageList getPlatformServices(AuthzSubject subject,
                                    java.lang.Integer platId,
                                    java.lang.Integer typeId,
                                    PageControl pc)
                             throws PlatformNotFoundException,
                                    PermissionException,
                                    ServiceNotFoundException
Get platform services (children of virtual servers) of a specified type

Throws:
PlatformNotFoundException
PermissionException
ServiceNotFoundException

findServicesByType

public java.util.List findServicesByType(Server server,
                                         ServiceType st)
Get Services which are children of the server, and of the specified type.


findPlatformServicesByType

public java.util.List findPlatformServicesByType(Platform p,
                                                 ServiceType st)
Get platform service POJOs


getPlatformServices

public java.util.Collection getPlatformServices(AuthzSubject subject,
                                                java.lang.Integer platId)
                                         throws ServiceNotFoundException,
                                                PermissionException
Get platform service POJOs

Throws:
ServiceNotFoundException
PermissionException

getMappedPlatformServices

public java.util.Map getMappedPlatformServices(AuthzSubject subject,
                                               java.lang.Integer platId,
                                               PageControl pc)
                                        throws PlatformNotFoundException,
                                               PermissionException,
                                               ServiceNotFoundException
Get platform services (children of virtual servers), mapped by type id of a specified type

Throws:
PlatformNotFoundException
PermissionException
ServiceNotFoundException

getServicesByPlatform

public PageList getServicesByPlatform(AuthzSubject subject,
                                      java.lang.Integer platId,
                                      java.lang.Integer svcTypeId,
                                      PageControl pc)
                               throws ServiceNotFoundException,
                                      PlatformNotFoundException,
                                      PermissionException
Get services by platform.

Throws:
ServiceNotFoundException
PlatformNotFoundException
PermissionException

getServicesByApplication

public PageList getServicesByApplication(AuthzSubject subject,
                                         java.lang.Integer appId,
                                         PageControl pc)
                                  throws ApplicationNotFoundException,
                                         ServiceNotFoundException,
                                         PermissionException
Returns:
A List of ServiceValue and ServiceClusterValue objects representing all of the services that the given subject is allowed to view.
Throws:
ApplicationNotFoundException
ServiceNotFoundException
PermissionException

getServicesByApplication

public PageList getServicesByApplication(AuthzSubject subject,
                                         java.lang.Integer appId,
                                         java.lang.Integer svcTypeId,
                                         PageControl pc)
                                  throws PermissionException,
                                         ApplicationNotFoundException,
                                         ServiceNotFoundException
Returns:
A List of ServiceValue and ServiceClusterValue objects representing all of the services that the given subject is allowed to view.
Throws:
ApplicationNotFoundException - if the appId is bogus
ServiceNotFoundException - if services could not be looked up
PermissionException

getServicesByApplication

public java.util.List getServicesByApplication(AuthzSubject subject,
                                               java.lang.Integer appId)
                                        throws PermissionException,
                                               ApplicationNotFoundException,
                                               ServiceNotFoundException
Returns:
A List of Service and ServiceCluster objects representing all of the services that the given subject is allowed to view.
Throws:
ApplicationNotFoundException - if the appId is bogus
ServiceNotFoundException - if services could not be looked up
PermissionException

getServiceInventoryByApplication

public PageList getServiceInventoryByApplication(AuthzSubject subject,
                                                 java.lang.Integer appId,
                                                 PageControl pc)
                                          throws ApplicationNotFoundException,
                                                 ServiceNotFoundException,
                                                 PermissionException
Returns:
A List of ServiceValue and ServiceClusterValue objects representing all of the services that the given subject is allowed to view.
Throws:
ApplicationNotFoundException
ServiceNotFoundException
PermissionException

getFlattenedServicesByApplication

public PageList getFlattenedServicesByApplication(AuthzSubject subject,
                                                  java.lang.Integer appId,
                                                  java.lang.Integer typeId,
                                                  PageControl pc)
                                           throws ApplicationNotFoundException,
                                                  ServiceNotFoundException,
                                                  PermissionException
Get all services by application. This is to only be used for the Evident API.

Throws:
ApplicationNotFoundException
ServiceNotFoundException
PermissionException

getServiceInventoryByApplication

public PageList getServiceInventoryByApplication(AuthzSubject subject,
                                                 java.lang.Integer appId,
                                                 java.lang.Integer svcTypeId,
                                                 PageControl pc)
                                          throws ApplicationNotFoundException,
                                                 ServiceNotFoundException,
                                                 PermissionException
Returns:
A List of ServiceValue and ServiceClusterValue objects representing all of the services that the given subject is allowed to view.
Throws:
ApplicationNotFoundException
ServiceNotFoundException
PermissionException

getFlattenedServiceIdsByApplication

public java.lang.Integer[] getFlattenedServiceIdsByApplication(AuthzSubject subject,
                                                               java.lang.Integer appId)
                                                        throws ServiceNotFoundException,
                                                               PermissionException,
                                                               ApplicationNotFoundException
Get all service inventory by application, including those inside an associated cluster

Parameters:
subject - The subject trying to list services.
appId - Application id.
Returns:
A List of ServiceValue objects representing all of the services that the given subject is allowed to view.
Throws:
ServiceNotFoundException
PermissionException
ApplicationNotFoundException

updateServiceZombieStatus

public void updateServiceZombieStatus(AuthzSubject subject,
                                      Service svc,
                                      boolean zombieStatus)
                               throws PermissionException
Throws:
PermissionException

updateService

public Service updateService(AuthzSubject subject,
                             ServiceValue existing)
                      throws PermissionException,
                             UpdateException,
                             AppdefDuplicateNameException,
                             ServiceNotFoundException
Throws:
PermissionException
UpdateException
AppdefDuplicateNameException
ServiceNotFoundException

updateServiceTypes

public void updateServiceTypes(java.lang.String plugin,
                               ServiceTypeInfo[] infos)
                        throws javax.ejb.CreateException,
                               javax.ejb.FinderException,
                               javax.ejb.RemoveException,
                               VetoException
Throws:
javax.ejb.CreateException
javax.ejb.FinderException
javax.ejb.RemoveException
VetoException

deleteServiceType

public void deleteServiceType(ServiceType serviceType,
                              AuthzSubject overlord,
                              org.hyperic.hq.authz.shared.ResourceGroupManagerLocal resGroupMan,
                              org.hyperic.hq.authz.shared.ResourceManagerLocal resMan)
                       throws VetoException,
                              javax.ejb.RemoveException
Throws:
VetoException
javax.ejb.RemoveException

removeService

public void removeService(AuthzSubject subject,
                          Service service)
                   throws javax.ejb.RemoveException,
                          PermissionException,
                          VetoException
A removeService method that takes a ServiceLocal. This is called by ServerManager.removeServer when cascading a delete onto services.

Throws:
javax.ejb.RemoveException
PermissionException
VetoException

handleResourceDelete

public void handleResourceDelete(Resource resource)

getServiceTypeCounts

public java.util.List getServiceTypeCounts()
Returns a list of 2 element arrays. The first element is the name of the service type, the second element is the # of services of that type in the inventory.


getServiceCount

public java.lang.Number getServiceCount()
Get the # of services within HQ inventory


getOne

public static org.hyperic.hq.appdef.shared.ServiceManagerLocal getOne()

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.