• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Counted类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.codahale.metrics.annotation.Counted的典型用法代码示例。如果您正苦于以下问题:Java Counted类的具体用法?Java Counted怎么用?Java Counted使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Counted类属于com.codahale.metrics.annotation包,在下文中一共展示了Counted类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createTicketGrantingTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@Audit(
    action="TICKET_GRANTING_TICKET",
    actionResolverName="CREATE_TICKET_GRANTING_TICKET_RESOLVER",
    resourceResolverName="CREATE_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER")
@Timed(name = "CREATE_TICKET_GRANTING_TICKET_TIMER")
@Metered(name = "CREATE_TICKET_GRANTING_TICKET_METER")
@Counted(name="CREATE_TICKET_GRANTING_TICKET_COUNTER", monotonic=true)
@Override
public TicketGrantingTicket createTicketGrantingTicket(final AuthenticationContext context)
        throws AuthenticationException, AbstractTicketException {

    final Authentication authentication = context.getAuthentication();
    final TicketGrantingTicketFactory factory = this.ticketFactory.get(TicketGrantingTicket.class);
    final TicketGrantingTicket ticketGrantingTicket = factory.create(authentication);

    this.ticketRegistry.addTicket(ticketGrantingTicket);

    doPublishEvent(new CasTicketGrantingTicketCreatedEvent(this, ticketGrantingTicket));

    return ticketGrantingTicket;
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:22,代码来源:CentralAuthenticationServiceImpl.java


示例2: destroyTicketGrantingTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * Destroy a TicketGrantingTicket and perform back channel logout. This has the effect of invalidating any
 * Ticket that was derived from the TicketGrantingTicket being destroyed. May throw an
 * {@link IllegalArgumentException} if the TicketGrantingTicket ID is null.
 *
 * @param ticketGrantingTicketId the id of the ticket we want to destroy
 * @return the logout requests.
 */
@Audit(
        action="TICKET_GRANTING_TICKET_DESTROYED",
        actionResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOLVER",
        resourceResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER")
@Timed(name = "DESTROY_TICKET_GRANTING_TICKET_TIMER")
@Metered(name="DESTROY_TICKET_GRANTING_TICKET_METER")
@Counted(name="DESTROY_TICKET_GRANTING_TICKET_COUNTER", monotonic=true)
@Override
public List<LogoutRequest> destroyTicketGrantingTicket(@NotNull final String ticketGrantingTicketId) {
    try {
        logger.debug("Removing ticket [{}] from registry...", ticketGrantingTicketId);
        final TicketGrantingTicket ticket = getTicket(ticketGrantingTicketId, TicketGrantingTicket.class);
        logger.debug("Ticket found. Processing logout requests and then deleting the ticket...");
        final List<LogoutRequest> logoutRequests = logoutManager.performLogout(ticket);
        this.ticketRegistry.deleteTicket(ticketGrantingTicketId);
        return logoutRequests;
    } catch (final InvalidTicketException e) {
        logger.debug("TicketGrantingTicket [{}] cannot be found in the ticket registry.", ticketGrantingTicketId);
    }
    return Collections.emptyList();
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:31,代码来源:CentralAuthenticationServiceImpl.java


示例3: grantServiceTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@Audit(
    action="SERVICE_TICKET",
    actionResolverName="GRANT_SERVICE_TICKET_RESOLVER",
    resourceResolverName="GRANT_SERVICE_TICKET_RESOURCE_RESOLVER")
@Timed(name = "GRANT_SERVICE_TICKET_TIMER")
@Metered(name="GRANT_SERVICE_TICKET_METER")
@Counted(name="GRANT_SERVICE_TICKET_COUNTER", monotonic=true)
@Override
public ServiceTicket grantServiceTicket(final String ticketGrantingTicketId,
    final Service service) throws TicketException {
    try {
        return this.grantServiceTicket(ticketGrantingTicketId, service, (Credential[]) null);
    } catch (final AuthenticationException e) {
        throw new IllegalStateException("Unexpected authentication exception", e);
    }
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:17,代码来源:CentralAuthenticationServiceImpl.java


示例4: getTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Timed(name = "GET_TICKET_TIMER")
@Metered(name = "GET_TICKET_METER")
@Counted(name="GET_TICKET_COUNTER", monotonic=true)
@Override
public <T extends Ticket> T getTicket(final String ticketId, final Class<? extends Ticket> clazz)
        throws InvalidTicketException {
    Assert.notNull(ticketId, "ticketId cannot be null");
    final Ticket ticket = this.ticketRegistry.getTicket(ticketId, clazz);

    if (ticket == null) {
        logger.debug("Ticket [{}] by type [{}] cannot be found in the ticket registry.", ticketId, clazz.getSimpleName());
        throw new InvalidTicketException(ticketId);
    }

    if (ticket instanceof TicketGrantingTicket) {
        synchronized (ticket) {
            if (ticket.isExpired()) {
                this.ticketRegistry.deleteTicket(ticketId);
                logger.debug("Ticket [{}] has expired and is now deleted from the ticket registry.", ticketId);
                throw new InvalidTicketException(ticketId);
            }
        }
    }
    return (T) ticket;
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:29,代码来源:CentralAuthenticationServiceImpl.java


示例5: authenticate

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@Override
@Audit(
        action = "AUTHENTICATION",
        actionResolverName = "AUTHENTICATION_RESOLVER",
        resourceResolverName = "AUTHENTICATION_RESOURCE_RESOLVER")
@Timed(name = "AUTHENTICATE_TIMER")
@Metered(name = "AUTHENTICATE_METER")
@Counted(name = "AUTHENTICATE_COUNT", monotonic = true)
public Authentication authenticate(final AuthenticationTransaction transaction) throws AuthenticationException {
    AuthenticationCredentialsLocalBinder.bindCurrent(transaction.getCredentials());
    final AuthenticationBuilder builder = authenticateInternal(transaction);
    final Authentication authentication = builder.build();
    final Principal principal = authentication.getPrincipal();
    if (principal instanceof NullPrincipal) {
        throw new UnresolvedPrincipalException(authentication);
    }
    addAuthenticationMethodAttribute(builder, authentication);
    LOGGER.info("Authenticated principal [{}] with attributes [{}] via credentials [{}].",
            principal.getId(), principal.getAttributes(), transaction.getCredentials());
    populateAuthenticationMetadataAttributes(builder, transaction);
    final Authentication a = builder.build();
    AuthenticationCredentialsLocalBinder.bindCurrent(a);
    return a;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:25,代码来源:AbstractAuthenticationManager.java


示例6: authenticate

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@Override
@Audit(
    action="AUTHENTICATION",
    actionResolverName="AUTHENTICATION_RESOLVER",
    resourceResolverName="AUTHENTICATION_RESOURCE_RESOLVER")
@Timed(name="AUTHENTICATE_TIMED")
@Metered(name="AUTHENTICATE_METER")
@Counted(name="AUTHENTICATE_COUNT", monotonic=true)
public Authentication authenticate(final AuthenticationTransaction transaction) throws AuthenticationException {

    final AuthenticationBuilder builder = authenticateInternal(transaction.getCredentials());
    final Authentication authentication = builder.build();
    final Principal principal = authentication.getPrincipal();
    if (principal instanceof NullPrincipal) {
        throw new UnresolvedPrincipalException(authentication);
    }

    addAuthenticationMethodAttribute(builder, authentication);

    logger.info("Authenticated {} with credentials {}.", principal, transaction.getCredentials());
    logger.debug("Attribute map for {}: {}", principal.getId(), principal.getAttributes());

    populateAuthenticationMetadataAttributes(builder, transaction.getCredentials());

    return builder.build();
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:27,代码来源:PolicyBasedAuthenticationManager.java


示例7: getTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * Note:
 * Synchronization on ticket object in case of cache based registry doesn't serialize
 * access to critical section. The reason is that cache pulls serialized data and
 * builds new object, most likely for each pull. Is this synchronization needed here?
 */
@Timed(name = "GET_TICKET_TIMER")
@Metered(name = "GET_TICKET_METER")
@Counted(name="GET_TICKET_COUNTER", monotonic=true)
@Override
public <T extends Ticket> T getTicket(final String ticketId, final Class<? extends Ticket> clazz)
        throws InvalidTicketException {
    Assert.notNull(ticketId, "ticketId cannot be null");
    final Ticket ticket = this.ticketRegistry.getTicket(ticketId, clazz);

    if (ticket == null) {
        logger.debug("Ticket [{}] by type [{}] cannot be found in the ticket registry.", ticketId, clazz.getSimpleName());
        throw new InvalidTicketException(ticketId);
    }

    if (ticket instanceof TicketGrantingTicket) {
        synchronized (ticket) {
            if (ticket.isExpired()) {
                this.ticketRegistry.deleteTicket(ticketId);
                logger.debug("Ticket [{}] has expired and is now deleted from the ticket registry.", ticketId);
                throw new InvalidTicketException(ticketId);
            }
        }
    }
    return (T) ticket;
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:34,代码来源:AbstractCentralAuthenticationService.java


示例8: destroyTicketGrantingTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * Destroy a TicketGrantingTicket and perform back channel logout. This has the effect of invalidating any
 * Ticket that was derived from the TicketGrantingTicket being destroyed. May throw an
 * {@link IllegalArgumentException} if the TicketGrantingTicket ID is null.
 *
 * @param ticketGrantingTicketId the id of the ticket we want to destroy
 * @return the logout requests.
 */
@Audit(
        action="TICKET_GRANTING_TICKET_DESTROYED",
        actionResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOLVER",
        resourceResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER")
@Timed(name = "DESTROY_TICKET_GRANTING_TICKET_TIMER")
@Metered(name="DESTROY_TICKET_GRANTING_TICKET_METER")
@Counted(name="DESTROY_TICKET_GRANTING_TICKET_COUNTER", monotonic=true)
@Override
public List<LogoutRequest> destroyTicketGrantingTicket(@NotNull final String ticketGrantingTicketId) {
    try {
        logger.debug("Removing ticket [{}] from registry...", ticketGrantingTicketId);
        final TicketGrantingTicket ticket = getTicket(ticketGrantingTicketId, TicketGrantingTicket.class);
        logger.debug("Ticket found. Processing logout requests and then deleting the ticket...");
        final List<LogoutRequest> logoutRequests = logoutManager.performLogout(ticket);
        this.ticketRegistry.deleteTicket(ticketGrantingTicketId);

        doPublishEvent(new CasTicketGrantingTicketDestroyedEvent(this, ticket));

        return logoutRequests;
    } catch (final InvalidTicketException e) {
        logger.debug("TicketGrantingTicket [{}] cannot be found in the ticket registry.", ticketGrantingTicketId);
    }
    return Collections.emptyList();
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:34,代码来源:CentralAuthenticationServiceImpl.java


示例9: addDevice

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@Timed(name = "deviceUI-addDevice")
@Counted(name = "deviceUI-Counter")
@RequestMapping(value = "/addDevice", method = RequestMethod.POST)
public
@ResponseBody
void addDevice(@ModelAttribute("devices") List<Device> devices, @RequestBody Device device) {

    //Archaius Dynamic Property Loading
    Boolean gatherStatistics = dynamicBooleanProperty.get();
    if (gatherStatistics) {
        requestsAddDeviceMetric.mark();
        timerAddDevice.time();
    }

    String identifier = idGeneratorService.generateIdentifier(serviceUrl() + "/device/idGenerator");
    device.setIdentifier(identifier);
    devices.add(device);

    if (gatherStatistics) { timerAddDevice.time().stop(); };
}
 
开发者ID:arityllc,项目名称:referenceapp,代码行数:21,代码来源:DeviceUiApplication.java


示例10: destroyTicketGrantingTicket

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * Destroy a TicketGrantingTicket and perform back channel logout. This has the effect of invalidating any
 * Ticket that was derived from the TicketGrantingTicket being destroyed. May throw an
 * {@link IllegalArgumentException} if the TicketGrantingTicket ID is null.
 *
 * @param ticketGrantingTicketId the id of the ticket we want to destroy
 * @return the logout requests.
 */
@Audit(
        action="TICKET_GRANTING_TICKET_DESTROYED",
        actionResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOLVER",
        resourceResolverName="DESTROY_TICKET_GRANTING_TICKET_RESOURCE_RESOLVER")
@Timed(name = "DESTROY_TICKET_GRANTING_TICKET_TIMER")
@Metered(name="DESTROY_TICKET_GRANTING_TICKET_METER")
@Counted(name="DESTROY_TICKET_GRANTING_TICKET_COUNTER", monotonic=true)
@Override
public List<LogoutRequest> destroyTicketGrantingTicket(@NotNull final String ticketGrantingTicketId) {
    try {
        logger.debug("Removing ticket [{}] from registry...", ticketGrantingTicketId);
        final TicketGrantingTicket ticket = getTicket(ticketGrantingTicketId, TicketGrantingTicket.class);
        logger.debug("Ticket found. Processing logout requests and then deleting the ticket...");
        final List<LogoutRequest> logoutRequests = logoutManager.performLogout(ticket);
        this.ticketRegistry.deleteTicket(ticketGrantingTicketId);

        return logoutRequests;
    } catch (final InvalidTicketException e) {
        logger.debug("TicketGrantingTicket [{}] cannot be found in the ticket registry.", ticketGrantingTicketId);
    }
    return Collections.emptyList();
}
 
开发者ID:xuchengdong,项目名称:cas4.1.9,代码行数:32,代码来源:CentralAuthenticationServiceImpl.java


示例11: findAll

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Retrieves all AdministrativeUnit ", response = AdministrativeUnit.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "AdministrativeUnit found",
                response = AdministrativeUnit.class),
        @ApiResponse(code = 404, message = "No AdministrativeUnit found"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(method = RequestMethod.GET, value = ADMINISTRATIVE_UNIT)
public ResponseEntity<AdministrativeUnitHateoas> findAll(HttpServletRequest request) {
    AdministrativeUnitHateoas adminHateoas = new AdministrativeUnitHateoas(
            (ArrayList<INikitaEntity>) (ArrayList) administrativeUnitService.findAll());
    administrativeUnitHateoasHandler.addLinks(adminHateoas, request, new Authorisation());

    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .body(adminHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:21,代码来源:AdministrativeUnitController.java


示例12: getAdministrativeUnitTemplate

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Creates a suggested AdministrativeUnit", response = AdministrativeUnit.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "AdministrativeUnit codes found",
                response = AdministrativeUnit.class),
        @ApiResponse(code = 404, message = "No AdministrativeUnit found"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(method = RequestMethod.GET, value = NEW_ADMINISTRATIVE_UNIT)
public ResponseEntity<AdministrativeUnitHateoas> getAdministrativeUnitTemplate(HttpServletRequest request) {
    AdministrativeUnit administrativeUnit = new AdministrativeUnit();
    administrativeUnit.setShortName("kortnavn på administrativtenhet");
    administrativeUnit.setAdministrativeUnitName("Formell navn på administrativtenhet");
    AdministrativeUnitHateoas adminHateoas = new AdministrativeUnitHateoas(administrativeUnit);
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .body(adminHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:21,代码来源:AdministrativeUnitController.java


示例13: findOneRegistryEntrybySystemId

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Retrieves a single RegistryEntry entity given a systemId", response = RegistryEntry.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "RegistryEntry returned", response = RegistryEntry.class),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(value = SLASH + LEFT_PARENTHESIS + SYSTEM_ID + RIGHT_PARENTHESIS, method = RequestMethod.GET)
public ResponseEntity<RegistryEntryHateoas> findOneRegistryEntrybySystemId(
        HttpServletRequest request,
        @ApiParam(name = "systemID",
                value = "systemID of the registryEntry to retrieve",
                required = true)
        @PathVariable("systemID") final String registryEntrySystemId) {
    RegistryEntry registryEntry = registryEntryService.findBySystemIdOrderBySystemId(registryEntrySystemId);

    RegistryEntryHateoas registryEntryHateoas = new
            RegistryEntryHateoas(registryEntry);
    registryEntryHateoasHandler.addLinks(registryEntryHateoas, request, new Authorisation());
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .eTag(registryEntry.getVersion().toString())
            .body(registryEntryHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:26,代码来源:RegistryEntryHateoasController.java


示例14: ignore

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Retrieves multiple RegistryEntry entities limited by ownership rights", notes = "The field skip" +
        "tells how many RegistryEntry rows of the result set to ignore (starting at 0), while  top tells how many rows" +
        " after skip to return. Note if the value of top is greater than system value " +
        " nikita-noark5-core.pagination.maxPageSize, then nikita-noark5-core.pagination.maxPageSize is used. ",
        response = RegistryEntryHateoas.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "RegistryEntry found",
                response = RegistryEntryHateoas.class),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<RegistryEntryHateoas> findAllRegistryEntry(
        HttpServletRequest request,
        @RequestParam(name = "top", required = false) Integer top,
        @RequestParam(name = "skip", required = false) Integer skip) {
    RegistryEntryHateoas registryEntryHateoas = new
            RegistryEntryHateoas((ArrayList<INikitaEntity>) (ArrayList)
            registryEntryService.findRegistryEntryByOwnerPaginated(top, skip));
    registryEntryHateoasHandler.addLinks(registryEntryHateoas, request, new Authorisation());
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .body(registryEntryHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:27,代码来源:RegistryEntryHateoasController.java


示例15: entity

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Deletes a single RegistryEntry entity identified by systemID", response = String.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "Parent entity (DocumentDescription or Record) returned", response = String.class),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(value = SLASH + LEFT_PARENTHESIS + SYSTEM_ID + RIGHT_PARENTHESIS,
        method = RequestMethod.DELETE)
public ResponseEntity<String> deleteRecordBySystemId(HttpServletRequest request,
                                                     @ApiParam(name = "systemID",
                value = "systemID of the record to delete",
                required = true)
        @PathVariable("systemID") final String systemID) {

    RegistryEntry registryEntry = registryEntryService.findBySystemIdOrderBySystemId(systemID);
    registryEntryService.deleteEntity(systemID);
    applicationEventPublisher.publishEvent(new AfterNoarkEntityDeletedEvent(this, registryEntry));
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .body(CommonUtils.WebUtils.getSuccessStatusStringForDelete());
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:24,代码来源:RegistryEntryHateoasController.java


示例16: deleteCorrespondencePartUnit

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Deletes a single CorrespondencePartUnit entity identified by kode")
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "CorrespondencePartUnit deleted"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(value = CORRESPONDENCE_PART_UNIT + SLASH + LEFT_PARENTHESIS + CODE + RIGHT_PARENTHESIS,
        method = RequestMethod.DELETE)
public ResponseEntity<String> deleteCorrespondencePartUnit(
        @ApiParam(name = "kode",
                value = "kode of the correspondencePartUnit to delete",
                required = true)
        @PathVariable("kode") final String kode) {
    correspondencePartService.deleteCorrespondencePartUnit(kode);
    return ResponseEntity.status(HttpStatus.OK)
            .body("{\"status\" : \"Success\"}");
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:20,代码来源:CorrespondencePartHateoasController.java


示例17: deleteCorrespondencePartPerson

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Deletes a single CorrespondencePartPerson entity identified by kode")
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "CorrespondencePartPerson deleted"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(value = CORRESPONDENCE_PART_PERSON + SLASH + LEFT_PARENTHESIS + CODE + RIGHT_PARENTHESIS,
        method = RequestMethod.DELETE)
public ResponseEntity<String> deleteCorrespondencePartPerson(
        @ApiParam(name = "kode",
                value = "kode of the correspondencePartPerson to delete",
                required = true)
        @PathVariable("kode") final String kode) {
    correspondencePartService.deleteCorrespondencePartPerson(kode);
    return ResponseEntity.status(HttpStatus.OK)
            .body("{\"status\" : \"Success\"}");
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:20,代码来源:CorrespondencePartHateoasController.java


示例18: deleteCorrespondencePartInternal

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Deletes a single CorrespondencePartInternal entity identified by kode")
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "CorrespondencePartInternal deleted"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(value = CORRESPONDENCE_PART_INTERNAL + SLASH + LEFT_PARENTHESIS + CODE + RIGHT_PARENTHESIS,
        method = RequestMethod.DELETE)
public ResponseEntity<String> deleteCorrespondencePartInternal(
        @ApiParam(name = "kode",
                value = "kode of the correspondencePartInternal to delete",
                required = true)
        @PathVariable("kode") final String kode) {
    correspondencePartService.deleteCorrespondencePartInternal(kode);
    return ResponseEntity.status(HttpStatus.OK)
            .body("{\"status\" : \"Success\"}");
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:20,代码来源:CorrespondencePartHateoasController.java


示例19: findAll

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Retrieves all DocumentMedium ", response = DocumentMedium.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "DocumentMedium codes found",
                response = DocumentMedium.class),
        @ApiResponse(code = 404, message = "No DocumentMedium found"),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR)})
@Counted
@Timed
@RequestMapping(method = RequestMethod.GET, value = DOCUMENT_MEDIUM)
public ResponseEntity<MetadataHateoas> findAll(HttpServletRequest request) {
    //ArrayList <DocumentMedium> documentMediumList = (ArrayList<DocumentMedium>) documentMediumService.findAll2();
    MetadataHateoas metadataHateoas = new MetadataHateoas(new ArrayList<>(documentMediumService.findAll2()), DOCUMENT_MEDIUM);
    metadataHateoasHandler.addLinks(metadataHateoas, request, new Authorisation());
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .body(metadataHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:20,代码来源:DocumentMediumController.java


示例20: findBySystemIdOrderBySystemId

import com.codahale.metrics.annotation.Counted; //导入依赖的package包/类
@ApiOperation(value = "Gets documentMedium identified by its systemId", notes = "Returns the requested " +
        " documentMedium object", response = DocumentMedium.class)
@ApiResponses(value = {
        @ApiResponse(code = 200, message = "DocumentMedium " + API_MESSAGE_OBJECT_ALREADY_PERSISTED,
                response = DocumentMedium.class),
        @ApiResponse(code = 201, message = "DocumentMedium " + API_MESSAGE_OBJECT_SUCCESSFULLY_CREATED,
                response = DocumentMedium.class),
        @ApiResponse(code = 401, message = API_MESSAGE_UNAUTHENTICATED_USER),
        @ApiResponse(code = 403, message = API_MESSAGE_UNAUTHORISED_FOR_USER),
        @ApiResponse(code = 404, message = API_MESSAGE_MALFORMED_PAYLOAD),
        @ApiResponse(code = 409, message = API_MESSAGE_CONFLICT),
        @ApiResponse(code = 500, message = API_MESSAGE_INTERNAL_SERVER_ERROR),
        @ApiResponse(code = 501, message = API_MESSAGE_NOT_IMPLEMENTED)})
@Counted
@Timed
@RequestMapping(value = DOCUMENT_MEDIUM + SLASH + LEFT_PARENTHESIS + SYSTEM_ID + RIGHT_PARENTHESIS + SLASH, method = RequestMethod.GET)
public ResponseEntity<MetadataHateoas> findBySystemIdOrderBySystemId(@PathVariable("systemID") final String systemId,
                                                                     HttpServletRequest request) {
    DocumentMedium documentMedium = documentMediumService.findBySystemIdOrderBySystemId(systemId);
    MetadataHateoas metadataHateoas = new MetadataHateoas(documentMedium);
    metadataHateoasHandler.addLinks(metadataHateoas, request, new Authorisation());
    return ResponseEntity.status(HttpStatus.OK)
            .allow(CommonUtils.WebUtils.getMethodsForRequestOrThrow(request.getServletPath()))
            .eTag(documentMedium.getVersion().toString())
            .body(metadataHateoas);
}
 
开发者ID:HiOA-ABI,项目名称:nikita-noark5-core,代码行数:27,代码来源:DocumentMediumController.java



注:本文中的com.codahale.metrics.annotation.Counted类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XYLineAnnotation类代码示例发布时间:2022-05-22
下一篇:
Java Objects类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap