public void setAddResourceAndMethodIds(boolean addResourceAndMethodIds) { ResourceIdGenerator idGen = addResourceAndMethodIds ? new ResourceIdGeneratorImpl() : null; setResourceIdGenerator(idGen); } public void setResourceIdGenerator(ResourceIdGenerator idGen) {
protected SchemaWriter createSchemaWriter(ResourceTypes resourceTypes, JAXBContext context, UriInfo ui) { // if neither externalSchemaLinks nor externalSchemasCache is set // then JAXBContext will be used to generate the schema if (externalSchemaLinks != null && externalSchemasCache == null) { return new ExternalSchemaWriter(externalSchemaLinks, ui); } else if (externalSchemasCache != null) { return new StringSchemaWriter(externalSchemasCache, externalSchemaLinks, ui); } else { SchemaCollection coll = getSchemaCollection(resourceTypes, context); if (coll != null) { return new SchemaCollectionWriter(coll); } } return null; }
protected void handlePathAndMatrixClassParams(OperationResourceInfo ori, StringBuilder sb, Map<Parameter, Object> params, boolean isJson) { doHandleClassParams(ori, sb, params, isJson, ParameterType.PATH); doHandleClassParams(ori, sb, params, isJson, ParameterType.MATRIX); doHandleJaxrsBeanParamClassParams(ori, sb, params, isJson, ParameterType.PATH, ParameterType.MATRIX); }
protected ElementQNameResolver createElementQNameResolver(JAXBContext context) { if (resolver != null) { return resolver; } if (useJaxbContextForQnames) { if (context != null) { JAXBContextProxy proxy = JAXBUtils.createJAXBContextProxy(context); return new JaxbContextQNameResolver(proxy); } return null; } else if (externalQnamesMap != null) { return new SchemaQNameResolver(externalQnamesMap); } else { return new XMLNameQNameResolver(); } }
protected void handlePathAndMatrixParams(StringBuilder sb, OperationResourceInfo ori, boolean isJson) { handleParams(sb, ori, ParameterType.PATH, isJson); handleParams(sb, ori, ParameterType.MATRIX, isJson); doWriteJaxrsBeanParams(sb, ori, isJson, ParameterType.PATH, ParameterType.MATRIX); }
protected void startResourceTag(StringBuilder sb, ClassResourceInfo cri, String path) { sb.append("<resource path=\"").append(getPath(path)).append("\""); if (idGenerator != null) { String id = idGenerator.getClassResourceId(cri); sb.append(" id=\"").append(id).append("\""); } sb.append(">"); }
public void setLinkJsonToXmlSchema(boolean link) { setLinkAnyMediaTypeToXmlSchema(link); }
private void handleApplicationDocs(StringBuilder sbApp) { if (applicationTitle != null) { sbApp.append("<doc title=\"").append(xmlEncodeIfNeeded(applicationTitle)).append("\"/>"); } }
public void setIncludeDefaultWadlSchemaLocation(boolean inc) { if (inc) { setWadlSchemaLocation(DEFAULT_WADL_SCHEMA_LOC); } }
@Override public void filter(ContainerRequestContext context) { Message m = JAXRSUtils.getCurrentMessage(); if (m == null) { return; } doFilter(context, m); }
protected SchemaWriter createSchemaWriter(ResourceTypes resourceTypes, JAXBContext context, UriInfo ui) { // if neither externalSchemaLinks nor externalSchemasCache is set // then JAXBContext will be used to generate the schema if (externalSchemaLinks != null && externalSchemasCache == null) { return new ExternalSchemaWriter(externalSchemaLinks, ui); } else if (externalSchemasCache != null) { return new StringSchemaWriter(externalSchemasCache, externalSchemaLinks, ui); } else if (context != null) { SchemaCollection coll = getSchemaCollection(resourceTypes, context); if (coll != null) { return new SchemaCollectionWriter(coll); } } return null; }
protected ElementQNameResolver createElementQNameResolver(JAXBContext context) { if (resolver != null) { return resolver; } if (useJaxbContextForQnames) { if (context != null) { JAXBContextProxy proxy = JAXBUtils.createJAXBContextProxy(context); return new JaxbContextQNameResolver(proxy); } return null; } else if (externalQnamesMap != null) { return new SchemaQNameResolver(externalQnamesMap); } else { return new XMLNameQNameResolver(); } }
protected void handlePathAndMatrixClassParams(StringBuilder sb, Map<Parameter, Object> params, boolean isJson) { doHandleClassParams(sb, params, isJson, ParameterType.PATH); doHandleClassParams(sb, params, isJson, ParameterType.MATRIX); doHandleJaxrsBeanParamClassParams(sb, params, isJson, ParameterType.PATH, ParameterType.MATRIX); }
protected void handlePathAndMatrixParams(StringBuilder sb, OperationResourceInfo ori, boolean isJson) { handleParams(sb, ori, ParameterType.PATH, isJson); handleParams(sb, ori, ParameterType.MATRIX, isJson); doWriteJaxrsBeanParams(sb, ori, isJson, ParameterType.PATH, ParameterType.MATRIX); }
protected void startResourceTag(StringBuilder sb, ClassResourceInfo cri, String path) { sb.append("<resource path=\"").append(getPath(path)).append("\""); if (idGenerator != null) { String id = idGenerator.getClassResourceId(cri); sb.append(" id=\"").append(id).append("\""); } sb.append(">"); }
public void setAddResourceAndMethodIds(boolean addResourceAndMethodIds) { ResourceIdGenerator idGen = addResourceAndMethodIds ? new ResourceIdGeneratorImpl() : null; setResourceIdGenerator(idGen); } public void setResourceIdGenerator(ResourceIdGenerator idGen) {
public void setIncludeDefaultWadlSchemaLocation(boolean inc) { if (inc) { setWadlSchemaLocation(DEFAULT_WADL_SCHEMA_LOC); } }
protected SchemaWriter createSchemaWriter(ResourceTypes resourceTypes, JAXBContext context, UriInfo ui) { // if neither externalSchemaLinks nor externalSchemasCache is set // then JAXBContext will be used to generate the schema if (externalSchemaLinks != null && externalSchemasCache == null) { return new ExternalSchemaWriter(externalSchemaLinks, ui); } else if (externalSchemasCache != null) { return new StringSchemaWriter(externalSchemasCache, externalSchemaLinks, ui); } else { SchemaCollection coll = getSchemaCollection(resourceTypes, context); if (coll != null) { return new SchemaCollectionWriter(coll); } } return null; }
protected void handlePathAndMatrixClassParams(OperationResourceInfo ori, StringBuilder sb, Map<Parameter, Object> params, boolean isJson) { doHandleClassParams(ori, sb, params, isJson, ParameterType.PATH); doHandleClassParams(ori, sb, params, isJson, ParameterType.MATRIX); doHandleJaxrsBeanParamClassParams(ori, sb, params, isJson, ParameterType.PATH, ParameterType.MATRIX); }
protected void handlePathAndMatrixParams(StringBuilder sb, OperationResourceInfo ori, boolean isJson) { handleParams(sb, ori, ParameterType.PATH, isJson); handleParams(sb, ori, ParameterType.MATRIX, isJson); doWriteJaxrsBeanParams(sb, ori, isJson, ParameterType.PATH, ParameterType.MATRIX); }