Ejemplo n.º 1
0
        public VmOrganizationHeader WithdrawLanguage(VmEntityBasic model)
        {
            var entity = CommonService.WithdrawLanguage <OrganizationVersioned, OrganizationLanguageAvailability>(model);

            UnLockOrganization(entity.Id);
            return(GetOrganizationHeader(entity.Id));
        }
Ejemplo n.º 2
0
        public VmServiceHeader WithdrawLanguage(VmEntityBasic model)
        {
            var entity = CommonService.WithdrawLanguage <ServiceVersioned, ServiceLanguageAvailability>(model);

            UnLockService(entity.Id);
            return(GetServiceHeader(entity.Id));
        }
Ejemplo n.º 3
0
 public VmServiceHeader GetValidatedEntity(VmEntityBasic model)
 {
     return(ExecuteValidate
            (
                () => Utilities.LockEntityVersioned <ServiceVersioned, Service>(model.Id.Value, true),
                (unitOfWork) => GetServiceHeader(model.Id, unitOfWork)
            ));
 }
Ejemplo n.º 4
0
 public VmOrganizationHeader GetValidatedEntity(VmEntityBasic model)
 {
     return(ExecuteValidate
            (
                () => Utilities.LockEntityVersioned <OrganizationVersioned, Organization>(model.Id.Value, true),
                (unitOfWork) => GetOrganizationHeader(model.Id, unitOfWork)
            ));
 }
 public IServiceResultWrap UnLockEntity([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceResultWrap()
     {
         Data = model.Id != null ? generalDescriptionService.UnLockGeneralDescription(model.Id.Value) : null,
     },
                new Dictionary <Type, string>()));
 }
Ejemplo n.º 6
0
 public IServiceResultWrap UnLockEntity([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap()
         {
             Data = model.Id.HasValue ? channelService.UnLockChannel(model.Id.Value) : null,
         },
         new Dictionary<Type, string>());
 }
Ejemplo n.º 7
0
 public IServiceResultWrap GetValidatedEntity([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap()
         {
             Data = model.Id.HasValue ? channelService.GetValidatedEntity(model) : null,
         },
         new Dictionary<Type, string>()
         {
             { typeof(LockException), MessageLockedChannel },
             { typeof(LockNotAllowedException), EntityMessageCannotBePublished }
         });
 }
Ejemplo n.º 8
0
 public IServiceResultWrap ArchiveEntity([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceLocalizedResultWrap(model)
         {
             Data = model.Id.HasValue ? channelService.DeleteChannel(model.Id) : null
         },
         new Dictionary<Type, string>()
         {
             { typeof(string), EntityMessageArchived },
             { typeof(LockException), MessageLockedChannel },
             { typeof(RoleActionException), MessageDeleteChannelRole }
         });
 }
 public IServiceResultWrap ArchiveEntity([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceLocalizedResultWrap(model)
     {
         Data = model.Id.HasValue ? organizationService.DeleteOrganization(model.Id.Value) : null
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), EntityMessageArchived },
         { typeof(LockException), MessageLockedOrganization },
         { typeof(RoleActionException), MessageDeleteOrganizationRole },
         { typeof(OrganizationNotDeleteInUserUseException), MessageOrganizationCannotDeleteInUse }
     }));
 }
 public IServiceResultWrap ArchiveLanguage([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceLocalizedResultWrap(model)
     {
         Data = model.Id.HasValue ? generalDescriptionService.ArchiveLanguage(model) : null
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), EntityMessageArchived },
         { typeof(LockException), MessageLockedGeneralDescription },
         { typeof(RoleActionException), MessageDeleteGeneralDescriptionRole },
         { typeof(ArchiveLanguageException), RESTCommonController.MessageDeleteLanguage }
     }));
 }
Ejemplo n.º 11
0
 public IServiceResultWrap RestoreLanguage([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceLocalizedResultWrap(model)
         {
             Data = model.Id.HasValue ? channelService.RestoreLanguage(model) : null
         },
         new Dictionary<Type, string>()
         {
             { typeof(string), EntityMessageRestored },
             { typeof(LockException), MessageLockedChannel },
             { typeof(RoleActionException), MessageDeleteChannelRole },
             { typeof(ArchiveLanguageException), RESTCommonController.MessageRestoreLanguage }
         });
 }
Ejemplo n.º 12
0
 public IServiceResultWrap RestoreEntity([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap()
         {
             Data = model.Id.HasValue ? channelService.RestoreChannel(model.Id.Value) : null,
         },
         new Dictionary<Type, string>()
         {
             { typeof(string), EntityMessageRestored },
             { typeof(LockException), MessageLockedChannel },
             { typeof(RoleActionException), MessageRestoreChannelRole },
             { typeof(RestoreModifiedExistsException), RESTCommonController.MessageRestoreModifiedExists }
         });
 }
Ejemplo n.º 13
0
 public IServiceResultWrap WithdrawLanguage([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceResultWrap()
     {
         Data = model.Id.HasValue ? serviceService.WithdrawLanguage(model) : null,
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), EntityMessageWithdrawn },
         { typeof(LockException), MessageLockedService },
         { typeof(RoleActionException), MessageWithdrawServiceRole },
         { typeof(WithdrawModifiedExistsException), RESTCommonController.MessageWithdrawModifiedExists }
     }));
 }
Ejemplo n.º 14
0
 private IServiceResultWrap LockChannel(VmEntityBasic model, bool isLockDisAllowedForArchived = false)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap()
         {
             Data = model.Id.HasValue ? channelService.LockChannel(model.Id.Value, isLockDisAllowedForArchived) : null,
         },
         new Dictionary<Type, string>()
         {
             { typeof(LockException), MessageLockedChannel },
             { typeof(LockNotAllowedException), EntityMessageCannotBeEdited },
             { typeof(RoleActionException), MessageLockChannelRole },
             { typeof(ModifiedExistsException), RESTCommonController.MessageUnableEditLocked }
         });
 }
Ejemplo n.º 15
0
 public IServiceResultWrap RestoreLanguage([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceLocalizedResultWrap(model)
     {
         Data = model.Id.HasValue ? organizationService.RestoreLanguage(model) : null
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), EntityMessageRestored },
         { typeof(LockException), MessageLockedOrganization },
         { typeof(RoleActionException), MessageDeleteOrganizationRole },
         { typeof(OrganizationNotDeleteInUserUseException), MessageOrganizationCannotDeleteInUse },
         { typeof(RestoreLanguageException), RESTCommonController.MessageRestoreLanguage }
     }));
 }
Ejemplo n.º 16
0
 public IServiceResultWrap RestoreEntity([FromBody] VmEntityBasic model)
 {
     return(serviceManager.CallService(
                () => new ServiceResultWrap()
     {
         Data = model.Id.HasValue ? organizationService.RestoreOrganization(model.Id.Value) : null,
     },
                new Dictionary <Type, string>()
     {
         { typeof(string), EntityMessageRestored },
         { typeof(LockException), MessageLockedOrganization },
         { typeof(RoleActionException), MessageRestoreOrganizationRole },
         { typeof(RestoreModifiedExistsException), RESTCommonController.MessageRestoreModifiedExists },
         { typeof(OrganizationCyclicDependencyException), MessageOrganizationCyclicDependency }
     }));
 }
Ejemplo n.º 17
0
 public IServiceResultWrap WithdrawEntity([FromBody] VmEntityBasic model)
 {
     return serviceManager.CallService(
         () => new ServiceResultWrap()
         {
             Data = model.Id.HasValue ? channelService.WithdrawChannel(model.Id.Value) : null,
         },
         new Dictionary<Type, string>()
         {
             { typeof(string), EntityMessageWithdrawn },
             { typeof(LockException), MessageLockedChannel },
             { typeof(RoleActionException), MessageWithdrawChannelRole },
             { typeof(PublishLanguageException), RESTCommonController.MessageNotVisibleLanguage },
             { typeof(WithdrawModifiedExistsException), RESTCommonController.MessageWithdrawModifiedExists }
         });
 }
Ejemplo n.º 18
0
 public IServiceResultWrap LockEntity([FromBody] VmEntityBasic model)
 {
     return(LockOrganization(model, true));
 }
Ejemplo n.º 19
0
 public IServiceResultWrap LockEntity([FromBody] VmEntityBasic model)
 {
     return LockChannel(model, true);
 }
 public IServiceResultWrap LockEntity([FromBody] VmEntityBasic model)
 {
     return(LockGeneralDescription(model, true));
 }