/** * * Creates the proper file name for the given resource instance and then * delegates creation of the file's contents to the abstract method of * the same name. * * @param epr * @param resource * * @see #getNextFileNumber(String) * @see #createResourceFile(EndpointReference, Resource, File) * */ protected void createResourceFile(EndpointReference epr, Resource resource) throws SoapFault { String contextPath = resource.getContextPath(); int nextNumber = getNextFileNumber(contextPath); String nextFileName = getNextFileName(nextNumber); File resourceTypeDir = getResourceTypeDirectory(contextPath); File resourceFile = new File(resourceTypeDir, nextFileName); createResourceFile(epr, resource, resourceFile); Map fileNumbersByEPR = (Map)getFileNumberTables().get(contextPath); fileNumbersByEPR.put(epr, new Integer(nextNumber)); }