org.apache.cayenne.project.FileProjectSaver.class Maven / Gradle / Ivy
???? 3?
6 ? ?
? p ? ?
? p ? ? p ? ?
? ?
p ? ? ?
?
? ? ? ? ? ?
? ? ? ? ? ? ?
p ? ?
p ?
p ?
p ?
p
p
?
" -
p
(
"
"
" p -
"
4
(
"
!
"
(#
$%
&'
(
)*+
,
"-.
'
"/
0123
O4
N5
M6
p7
M89
U:;<
W=>
Z
"?@
pA
^BC
DEFG
H
eI
dJKL
pMN
O
)PQRS SaveUnit InnerClasses
nameMapper :Lorg/apache/cayenne/configuration/ConfigurationNameMapper; RuntimeVisibleAnnotations Lorg/apache/cayenne/di/Inject; resourceGetter ;Lorg/apache/cayenne/configuration/ConfigurationNodeVisitor; Signature cLorg/apache/cayenne/configuration/ConfigurationNodeVisitor; saveableNodesGetter ?Lorg/apache/cayenne/configuration/ConfigurationNodeVisitor;>; fileEncoding Ljava/lang/String; ()V Code LineNumberTable LocalVariableTable this -Lorg/apache/cayenne/project/FileProjectSaver; getSupportedVersion ()Ljava/lang/String; save '(Lorg/apache/cayenne/project/Project;)V project $Lorg/apache/cayenne/project/Project; saveAs M(Lorg/apache/cayenne/project/Project;Lorg/apache/cayenne/resource/Resource;)V
baseDirectory &Lorg/apache/cayenne/resource/Resource;
StackMapTable N(Lorg/apache/cayenne/project/Project;Lorg/apache/cayenne/resource/Resource;Z)V node 4Lorg/apache/cayenne/configuration/ConfigurationNode; unit 6Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit; unusedResources Ljava/util/Collection; ex Ljava/io/IOException; baseResource deleteOldResources Z nodes units LocalVariableTypeTable &Ljava/util/Collection; LLjava/util/Collection; NLjava/util/Collection; ?T9 createSaveUnit ?(Lorg/apache/cayenne/configuration/ConfigurationNode;Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit; e $Ljava/lang/IllegalArgumentException; targetLocation targetResource targetUrl Ljava/net/URL;UR ?Q checkAccess (Ljava/util/Collection;)V
targetFile Ljava/io/File; parentV Q(Ljava/util/Collection;)V saveToTempFiles printWriter Ljava/io/PrintWriter; &Ljava/io/UnsupportedEncodingException; Ljava/io/FileNotFoundException; name1;= saveToTempFile N(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Ljava/io/PrintWriter;)V
saveCommit Ljava/net/MalformedURLException; tempFileK clearTempFiles clearRenamedFiles xunit sourceUrl
sourceFile isTarget
Exceptions
isFilesEquals (Ljava/io/File;Ljava/io/File;)Z firstFile
secondFile isFirstFileExists isSecondFileExists
firstFilePath secondFilePath deleteUnusedFiles
unusedFile unusedResource )(Ljava/util/Collection;)V
SourceFile FileProjectSaver.java ? ? 4org/apache/cayenne/project/ConfigurationSourceGetter x y .org/apache/cayenne/project/SaveableNodesGetter | y UTF-8 ~ 7WXY ? ? java/lang/NullPointerException Null 'baseDirectory' ?Z[\]^ java/util/Collection java/util/ArrayList_` ?abcTdefg 2org/apache/cayenne/configuration/ConfigurationNode ? ?hi ? ? ? ? ? ? ? ? ? ?jk 4org/apache/cayenne/project/FileProjectSaver$SaveUnitlmnopi ? ? java/io/IOException *org/apache/cayenne/CayenneRuntimeException ?qr ? ?stu $org/apache/cayenne/resource/Resourcevw t uxyz{|}~?? "java/lang/IllegalArgumentException ^Can't save configuration to the following location: '%s'. Is this a valid file location?. (%s) java/lang/Object? ? ????V???e?e &Error creating directory tree for '%s'? ? ???e Target file '%s' is a directory?e Can't write to file '%s'? ?U?` cayenne-project???? Error creating temp file (%s)???e java/io/PrintWriter java/io/OutputStreamWriter java/io/FileOutputStream ?? ?? ?? ? ?? ? java/lang/Throwable?q $java/io/UnsupportedEncodingException Unsupported encoding '%s' (%s) java/io/FileNotFoundException File not found '%s' (%s)?? -org/apache/cayenne/project/ConfigurationSaver ? ? ?? %Unable to remove old master file '%s'?? Unable to move '%s' to '%s' 4org/apache/cayenne/project/ConfigurationSourceSetter 'org/apache/cayenne/resource/URLResource?o ?? ?? java/net/MalformedURLException Malformed URL for file '%s' ? ? Could not delete file '%s'? ??i java/net/URL +org/apache/cayenne/project/FileProjectSaver 'org/apache/cayenne/project/ProjectSaver java/util/Iterator java/lang/String java/io/File "org/apache/cayenne/project/Project getConfigurationResource (()Lorg/apache/cayenne/resource/Resource; (Ljava/lang/String;)V getRootNode 6()Lorg/apache/cayenne/configuration/ConfigurationNode;
acceptVisitor O(Lorg/apache/cayenne/configuration/ConfigurationNodeVisitor;)Ljava/lang/Object; size ()I (I)V iterator ()Ljava/util/Iterator; hasNext ()Z next ()Ljava/lang/Object; add (Ljava/lang/Object;)Z getUnusedResources ()Ljava/util/Collection;
access$000 ^(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;)Lorg/apache/cayenne/resource/Resource; getURL ()Ljava/net/URL; remove (Ljava/lang/Throwable;)V clear 0(Lorg/apache/cayenne/project/FileProjectSaver;)V
access$102 ?(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Lorg/apache/cayenne/configuration/ConfigurationNode;)Lorg/apache/cayenne/configuration/ConfigurationNode;
access$002 ?(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/resource/Resource; 8org/apache/cayenne/configuration/ConfigurationNameMapper configurationLocation H(Lorg/apache/cayenne/configuration/ConfigurationNode;)Ljava/lang/String; getRelativeResource :(Ljava/lang/String;)Lorg/apache/cayenne/resource/Resource; org/apache/cayenne/util/Util toFile (Ljava/net/URL;)Ljava/io/File;
access$202 T(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Ljava/io/File;)Ljava/io/File;
getMessage =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V
access$200 F(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;)Ljava/io/File;
getParentFile ()Ljava/io/File; exists mkdirs getAbsolutePath ((Ljava/lang/String;[Ljava/lang/Object;)V isDirectory canWrite getName length createTempFile B(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
access$302
access$300 delete (Ljava/io/File;)V +(Ljava/io/OutputStream;Ljava/lang/String;)V (Ljava/io/Writer;)V close
addSuppressed
access$100 l(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;)Lorg/apache/cayenne/configuration/ConfigurationNode; *(Ljava/io/PrintWriter;Ljava/lang/String;)V renameTo (Ljava/io/File;)Z toURL (Ljava/net/URL;)V )(Lorg/apache/cayenne/resource/Resource;)V getCanonicalPath equals ! p 6 q t u v w x y z { | y z } ~ ? ? ? [ !*? *? Y? ? *? Y? ? *? ? ? 8 9 : = > ? ! ? ? ? ? ? -
? ? A ? ? ? ? ? ? C *++? ? ? ?
E
F ? ? ? ? ? ? ? ? i ,?
?
Y? ?*+,? ? ? I J L M ? ? ? ? ? ? ? ? ? ? ? &