public TagFactoryService() { super(TagState.class); this.setUseBodyForSelfLink(true); }
public static String generateSelfLink(TagState tagState) { String id = generateId(tagState); return UriUtils.buildUriPath(TagService.FACTORY_LINK, id); }
String tagSelfLink = TagFactoryService.generateSelfLink(tag); poolTags.putIfAbsent(pool.resourcePoolState.documentSelfLink, ConcurrentHashMap.newKeySet());
public static String generateSelfLink(TagState tagState) { String id = generateId(tagState); return UriUtils.buildUriPath(TagService.FACTORY_LINK, id); }
/** * Override the buildDefaultChildSelfLink method to set the documentSelfLink. We don't want to * have multiple tags with the same values, so we build the documentSelfLink ourselves taking * into account all fields in the TagState * * @see #generateSelfLink(TagState) */ @Override protected String buildDefaultChildSelfLink(ServiceDocument document) { TagState initState = (TagState) document; if (initState.key != null && initState.value != null) { return generateId(initState); } if (initState.documentSelfLink != null) { return initState.documentSelfLink; } return super.buildDefaultChildSelfLink(); }
public TagFactoryService() { super(TagState.class); this.setUseBodyForSelfLink(true); }
/** * Override the buildDefaultChildSelfLink method to set the documentSelfLink. We don't want to * have multiple tags with the same values, so we build the documentSelfLink ourselves taking * into account all fields in the TagState * * @see #generateSelfLink(TagState) */ @Override protected String buildDefaultChildSelfLink(ServiceDocument document) { TagState initState = (TagState)document; if (initState.key != null && initState.value != null) { return generateId(initState); } if (initState.documentSelfLink != null) { return initState.documentSelfLink; } return super.buildDefaultChildSelfLink(); }