org.apache.cayenne.project.FileProjectSaver.class Maven / Gradle / Ivy
???? 4?
C
?
? ? ?
! "#
$ ?%&
*'
(
?)*+
,
- $./ 01 2 ?345 =6
?7 89
?:
?;
?<
?=
?>
?@
1A =B C
?DEF
7G H
1I
1J
1KL
1M
NO
1PQRS
AT
7U
1V
WX
WY
WZ[
W\
7]
W^_
W`a
Wb
*cd
We
1fg
6T
1h
Wijkl
\m
[n
Zo
?p
Zqr
bstu
dTvw
gT
1xy
?z
k{|}
n~
n?0?
1?
???
W????
W?
??
z?
y???
???
W?
*???? 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;
extensions Ljava/util/Collection; OLjava/util/Collection; delegate 4Lorg/apache/cayenne/project/extension/SaverDelegate; (Ljava/util/List;)V Code LineNumberTable LocalVariableTable extension 7Lorg/apache/cayenne/project/extension/ProjectExtension; this -Lorg/apache/cayenne/project/FileProjectSaver; Ljava/util/List; delegates LocalVariableTypeTable ILjava/util/List; LLjava/util/Collection;
StackMapTable??/? L(Ljava/util/List;)V "RuntimeVisibleParameterAnnotations 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; N(Lorg/apache/cayenne/project/Project;Lorg/apache/cayenne/resource/Resource;Z)V namingDelegate unitSaverDelegate fileName targetLocation targetResource node 4Lorg/apache/cayenne/configuration/ConfigurationNode; unit 6Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit; unusedResources ex Ljava/io/IOException; baseResource deleteOldResources Z nodes units OLorg/apache/cayenne/configuration/ConfigurationNodeVisitor; &Ljava/util/Collection; LLjava/util/Collection; NLjava/util/Collection;&L29rE createSaveUnit ?(Lorg/apache/cayenne/configuration/ConfigurationNode;Lorg/apache/cayenne/resource/Resource;Lorg/apache/cayenne/project/extension/SaverDelegate;)Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit; e $Ljava/lang/IllegalArgumentException; targetUrl Ljava/net/URL;@??Q checkAccess (Ljava/util/Collection;)V
targetFile Ljava/io/File; parent? Q(Ljava/util/Collection;)V saveToTempFiles printWriter Ljava/io/PrintWriter; &Ljava/io/UnsupportedEncodingException; Ljava/io/FileNotFoundException; namejtv saveToTempFile N(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Ljava/io/PrintWriter;)V visitor encoder $Lorg/apache/cayenne/util/XMLEncoder; >Lorg/apache/cayenne/configuration/ConfigurationNodeVisitor<*>;?
saveCommit Ljava/net/MalformedURLException; tempFile? clearTempFiles clearRenamedFiles
sourceFile xunit sourceUrl 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 ? ? .org/apache/cayenne/project/SaveableNodesGetter ? ? UTF-8 ? ? ? ? java/util/ArrayList??? ????????? 5org/apache/cayenne/project/extension/ProjectExtension???? 0org/apache/cayenne/project/CompoundSaverDelegate ? ? ? ? "org/apache/cayenne/project/Project???? ? ? java/lang/NullPointerException Null 'baseDirectory' ?????? java/util/Collection??? 2org/apache/cayenne/configuration/ConfigurationNode ? ?????? ? ??? java/lang/String ? ? ? ? ? ? ? ? ? ??? 4org/apache/cayenne/project/FileProjectSaver$SaveUnit??????
? java/io/IOException *org/apache/cayenne/CayenneRuntimeException ???? ?????? $org/apache/cayenne/resource/Resource??????? "java/lang/IllegalArgumentException ^Can't save configuration to the following location: '%s'. Is this a valid file location?. (%s) java/lang/Object? ? ??????????? &Error creating directory tree for '%s'? ? ???? Target file '%s' is a directory?? Can't write to file '%s'? ??? cayenne-project???? Error creating temp file (%s)???? java/io/PrintWriter java/io/OutputStreamWriter java/io/FileOutputStream ?? ?? ?? ? ??? java/lang/Throwable?? $java/io/UnsupportedEncodingException Unsupported encoding '%s' (%s) java/io/FileNotFoundException File not found '%s' (%s)?? -org/apache/cayenne/project/ConfigurationSaver ? ? ?? "org/apache/cayenne/util/XMLEncoder ?? &????????? %Unable to remove old master file '%s'?? Unable to move '%s' to '%s' 4org/apache/cayenne/project/ConfigurationSourceSetter 'org/apache/cayenne/resource/URLResource????? ?? ?? java/net/MalformedURLException Malformed URL for file '%s' Could not delete file '%s'? ??? java/net/URL +org/apache/cayenne/project/FileProjectSaver 'org/apache/cayenne/project/ProjectSaver java/util/List java/util/Iterator 2org/apache/cayenne/project/extension/SaverDelegate java/io/File 9org/apache/cayenne/configuration/ConfigurationNodeVisitor ()V size ()I (I)V iterator ()Ljava/util/Iterator; hasNext ()Z next ()Ljava/lang/Object; createSaverDelegate 6()Lorg/apache/cayenne/project/extension/SaverDelegate; add (Ljava/lang/Object;)Z valueOf (I)Ljava/lang/String; 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; setBaseDirectory )(Lorg/apache/cayenne/resource/Resource;)V 8org/apache/cayenne/configuration/ConfigurationNameMapper configurationLocation H(Lorg/apache/cayenne/configuration/ConfigurationNode;)Ljava/lang/String; getRelativeResource :(Ljava/lang/String;)Lorg/apache/cayenne/resource/Resource; createNamingDelegate =()Lorg/apache/cayenne/configuration/ConfigurationNodeVisitor; 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$202 ?(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Lorg/apache/cayenne/project/extension/SaverDelegate;)Lorg/apache/cayenne/project/extension/SaverDelegate;
access$002 ?(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;Lorg/apache/cayenne/resource/Resource;)Lorg/apache/cayenne/resource/Resource; org/apache/cayenne/util/Util toFile (Ljava/net/URL;)Ljava/io/File;
access$302 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$300 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$402
access$400 delete (Ljava/io/File;)V +(Ljava/io/OutputStream;Ljava/lang/String;)V (Ljava/io/Writer;)V close
addSuppressed
access$200 l(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;)Lorg/apache/cayenne/project/extension/SaverDelegate; ^(Ljava/io/PrintWriter;Ljava/lang/String;Lorg/apache/cayenne/project/extension/SaverDelegate;)V <(Ljava/io/PrintWriter;Ljava/lang/String;Ljava/lang/String;)V println 8(Ljava/lang/String;)Lorg/apache/cayenne/util/XMLEncoder;
setXMLEncoder '(Lorg/apache/cayenne/util/XMLEncoder;)V
access$100 l(Lorg/apache/cayenne/project/FileProjectSaver$SaveUnit;)Lorg/apache/cayenne/configuration/ConfigurationNode; java/lang/System gc renameTo (Ljava/io/File;)Z toURI ()Ljava/net/URI; java/net/URI toURL (Ljava/net/URL;)V getCanonicalPath equals ! ? C ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? l*? *? Y? ? *? Y? ? *? *+?
? Y+? ?
M+? N-? ? -? ? :,? ? W???*? Y,? ? ? ? . ? @ A D F % G 3 H N I \ J _ K k L ? * N ? ? l ? ? l ? ? 3 9 ? ? ? l ? ? 3 9 ? ? ? ? : ? ? ? ? ? $ ? ? ? ? ? ? ? 0
? ? ? P ? ? ? ? ? ? C *++? ? ? ?
U
V ? ? ? ? ? ? ? ? i ,?
? Y? ?*+,? ? ? Z [ ] ^ ? ? ? ? ? ? ? ? ? ? ? g d+? *? ? ? :? Y? ! ?
:*? ,? " ? # :? ? ?? ? $:*? %? & :,? ' : * ? (? W*?
? # :
? ? S
? ? :? ) :? :
? ? *:? ,? ' : *
? (? W?????]*? +*? ,*? -*? .? :*? .?? I*? /+? 0:? # :? ? $? ? 1:? 2? 3 ? 4 W???*? 5? :? 7Y? 8?+? 0? 9 ? ? ? ? ? ? ? KN 6 ? ? # a b " d , f K g X h b i s k ? l ? m ? n ? o ? q ? r ? t ? u ? w ? z ? { ? } ? ~ ? } ? ~ ? ? ? ?0 ?B ?E ?K ?N ?P ?Z ?c ? ? ? ? 8 ? ? ? / ? ?
? ! ? ? ? A ? ? X ? ? ? b v ? ? K ? ? ? 0 ? ? : ? ? P
? ? d ? ? d ? ? d ? ? d ? ? R ? ? "B ? ? ? * ? 8 ? ? : ? ? R ? ? "B ? ? ? m ? 5 ? ? ?? H ? ? ? ? ? ? ? ? ? ? ? V? ? ? ? ? ? ? ? Z ?
? ? ?? *? B ? ? ? ? ; r? 1Y*? ::+? ;W-?