throw new WGAServiceException("You need an administrative login to access this service.");
}
WGADesignSource source = _core.getDesignManager().getDesignSources().get(WGAConfiguration.UID_DESIGNSOURCE_FILESYSTEM);
if (source instanceof FileSystemDesignSource) {
FileSystemDesignSource fsSource = (FileSystemDesignSource)source;
try {
fsSource.getDir().refresh();
FileObject resource = fsSource.getDir().resolveFile(state.getPath());
String basePath = fsSource.getDir().getURL().getPath();
String resourcePath = resource.getURL().getPath();
if (!resourcePath.startsWith(basePath)) {
throw new WGAServiceException(new IllegalArgumentException("Illegal design resource path '" + state.getPath() + "'."));
}