| 1 | package fr.sii.ogham.template.thymeleaf.v2.buider; | |
| 2 | ||
| 3 | import java.util.HashMap; | |
| 4 | import java.util.HashSet; | |
| 5 | import java.util.Map; | |
| 6 | import java.util.Set; | |
| 7 | ||
| 8 | import org.thymeleaf.TemplateEngine; | |
| 9 | import org.thymeleaf.cache.ICacheManager; | |
| 10 | import org.thymeleaf.dialect.IDialect; | |
| 11 | import org.thymeleaf.messageresolver.IMessageResolver; | |
| 12 | import org.thymeleaf.templatemode.ITemplateModeHandler; | |
| 13 | import org.thymeleaf.templatemode.StandardTemplateModeHandlers; | |
| 14 | import org.thymeleaf.templateresolver.ITemplateResolver; | |
| 15 | ||
| 16 | import fr.sii.ogham.core.builder.AbstractParent; | |
| 17 | import fr.sii.ogham.template.thymeleaf.common.buider.ThymeleafEngineConfigBuilder; | |
| 18 | ||
| 19 | /** | |
| 20 | * Fluent builder to configure Thymeleaf engine. | |
| 21 | * | |
| 22 | * @author Aurélien Baudet | |
| 23 | * | |
| 24 | * @param
 | |
| 25 | * the type of the parent builder (when calling {@link #and()} | |
| 26 | * method) | |
| 27 | */ | |
| 28 |
1
1. build : All methods instructions replaced by: return null; → NO_COVERAGE |
public class ThymeleafV2EngineConfigBuilder
 extends AbstractParent
 implements ThymeleafEngineConfigBuilder
 { |
| 29 | private Set<IDialect> dialects; | |
| 30 | private Map<String, IDialect> dialectsByPrefix; | |
| 31 | private Set<ITemplateResolver> templateResolvers; | |
| 32 | private ICacheManager cacheManager; | |
| 33 | private Set<IMessageResolver> messageResolvers; | |
| 34 | private Set<IMessageResolver> defaultMessageResolvers; | |
| 35 | private Set<ITemplateModeHandler> templateModeHandlers; | |
| 36 | private Set<ITemplateModeHandler> defaultTemplateModeHandlers; | |
| 37 | ||
| 38 | /** | |
| 39 | * Initializes the builder with a parent builder. The parent builder is used | |
| 40 | * when calling {@link #and()} method. | |
| 41 | * | |
| 42 | * @param parent | |
| 43 | * the parent builder | |
| 44 | */ | |
| 45 | public ThymeleafV2EngineConfigBuilder(P parent) { | |
| 46 | super(parent); | |
| 47 | } | |
| 48 | ||
| 49 | /** | |
| 50 | *
 | |
| 51 | * Sets a new unique dialect for this template engine. | |
| 52 | *
 | |
| 53 | *
 | |
| 54 | * This operation is equivalent to removing all the currently configured | |
| 55 | * dialects and then adding this one. | |
| 56 | *
 | |
| 57 | *
 | |
| 58 | * This operation can only be executed before processing templates for the | |
| 59 | * first time. Once a template is processed, the template engine is | |
| 60 | * considered to be initialized, and from then on any attempt to | |
| 61 | * change its configuration will result in an exception. | |
| 62 | *
 | |
| 63 | * | |
| 64 | * @param dialect | |
| 65 | * the new unique {@link IDialect} to be used. | |
| 66 | * @return this for fluent use | |
| 67 | */ | |
| 68 | public ThymeleafV2EngineConfigBuilder
 setDialect(final IDialect dialect) { | |
| 69 |
1
1. setDialect : All methods instructions replaced by: return null; → NO_COVERAGE |
dialects().clear(); |
| 70 | dialects().add(dialect); | |
| 71 | return this; | |
| 72 | } | |
| 73 | ||
| 74 | /** | |
| 75 | *
 | |
| 76 | * Adds a new dialect for this template engine, using the specified prefix. | |
| 77 | *
 | |
| 78 | *
 | |
| 79 | * This dialect will be added to the set of currently configured ones. | |
| 80 | *
 | |
| 81 | *
 | |
| 82 | * This operation can only be executed before processing templates for the | |
| 83 | * first time. Once a template is processed, the template engine is | |
| 84 | * considered to be initialized, and from then on any attempt to | |
| 85 | * change its configuration will result in an exception. | |
| 86 | *
 | |
| 87 | * | |
| 88 | * @param prefix | |
| 89 | * the prefix that will be used for this dialect | |
| 90 | * @param dialect | |
| 91 | * the new {@link IDialect} to be added to the existing ones. | |
| 92 | * @return this for fluent use | |
| 93 | */ | |
| 94 | public ThymeleafV2EngineConfigBuilder
 addDialect(final String prefix, final IDialect dialect) { | |
| 95 |
1
1. addDialect : All methods instructions replaced by: return null; → NO_COVERAGE |
this.dialectsByPrefix().put(prefix, dialect); |
| 96 | return this; | |
| 97 | } | |
| 98 | ||
| 99 | /** | |
| 100 | *
 | |
| 101 | * Adds a new dialect for this template engine, using the dialect's | |
| 102 | * specified default dialect. | |
| 103 | *
 | |
| 104 | *
 | |
| 105 | * This dialect will be added to the set of currently configured ones. | |
| 106 | *
 | |
| 107 | *
 | |
| 108 | * This operation can only be executed before processing templates for the | |
| 109 | * first time. Once a template is processed, the template engine is | |
| 110 | * considered to be initialized, and from then on any attempt to | |
| 111 | * change its configuration will result in an exception. | |
| 112 | *
 | |
| 113 | * | |
| 114 | * @param dialect | |
| 115 | * the new {@link IDialect} to be added to the existing ones. | |
| 116 | * @return this for fluent use | |
| 117 | */ | |
| 118 | public ThymeleafV2EngineConfigBuilder
 addDialect(final IDialect dialect) { | |
| 119 |
1
1. addDialect : All methods instructions replaced by: return null; → NO_COVERAGE |
dialects().add(dialect); |
| 120 | return this; | |
| 121 | } | |
| 122 | ||
| 123 | /** | |
| 124 | *
 | |
| 125 | * Sets a new set of dialects for this template engine, referenced by the | |
| 126 | * prefixes they will be using. | |
| 127 | *
 | |
| 128 | *
 | |
| 129 | * This operation can only be executed before processing templates for the | |
| 130 | * first time. Once a template is processed, the template engine is | |
| 131 | * considered to be initialized, and from then on any attempt to | |
| 132 | * change its configuration will result in an exception. | |
| 133 | *
 | |
| 134 | * | |
| 135 | * @param dialects | |
| 136 | * the new map of {@link IDialect} objects to be used, referenced | |
| 137 | * by their prefixes. | |
| 138 | * @return this for fluent use | |
| 139 | */ | |
| 140 | public ThymeleafV2EngineConfigBuilder
 setDialectsByPrefix(final Map<String, IDialect> dialects) { | |
| 141 |
1
1. setDialectsByPrefix : All methods instructions replaced by: return null; → NO_COVERAGE |
dialectsByPrefix().clear(); |
| 142 | dialectsByPrefix().putAll(dialects); | |
| 143 | return this; | |
| 144 | } | |
| 145 | ||
| 146 | /** | |
| 147 | *
 | |
| 148 | * Sets a new set of dialects for this template engine, all of them using | |
| 149 | * their default prefixes. | |
| 150 | *
 | |
| 151 | *
 | |
| 152 | * This operation can only be executed before processing templates for the | |
| 153 | * first time. Once a template is processed, the template engine is | |
| 154 | * considered to be initialized, and from then on any attempt to | |
| 155 | * change its configuration will result in an exception. | |
| 156 | *
 | |
| 157 | * | |
| 158 | * @param dialects | |
| 159 | * the new set of {@link IDialect} objects to be used. | |
| 160 | * @return this for fluent use | |
| 161 | */ | |
| 162 | public ThymeleafV2EngineConfigBuilder
 setDialects(final Set<IDialect> dialects) { | |
| 163 |
1
1. setDialects : All methods instructions replaced by: return null; → NO_COVERAGE |
this.dialects().clear(); |
| 164 | this.dialects().addAll(dialects); | |
| 165 | return this; | |
| 166 | } | |
| 167 | ||
| 168 | /** | |
| 169 | *
 | |
| 170 | * Sets an additional set of dialects for this template engine, all of them | |
| 171 | * using their default prefixes. | |
| 172 | *
 | |
| 173 | *
 | |
| 174 | * This operation can only be executed before processing templates for the | |
| 175 | * first time. Once a template is processed, the template engine is | |
| 176 | * considered to be initialized, and from then on any attempt to | |
| 177 | * change its configuration will result in an exception. | |
| 178 | *
 | |
| 179 | * | |
| 180 | * @param additionalDialects | |
| 181 | * the new set of {@link IDialect} objects to be used. | |
| 182 | * | |
| 183 | * @since 2.0.9 | |
| 184 | * @return this for fluent use | |
| 185 | */ | |
| 186 | public ThymeleafV2EngineConfigBuilder
 setAdditionalDialects(final Set<IDialect> additionalDialects) { | |
| 187 |
1
1. setAdditionalDialects : All methods instructions replaced by: return null; → NO_COVERAGE |
dialects().addAll(additionalDialects); |
| 188 | return this; | |
| 189 | } | |
| 190 | ||
| 191 | /** | |
| 192 | *
 | |
| 193 | * Removes all the currently configured dialects. | |
| 194 | *
 | |
| 195 | *
 | |
| 196 | * This operation can only be executed before processing templates for the | |
| 197 | * first time. Once a template is processed, the template engine is | |
| 198 | * considered to be initialized, and from then on any attempt to | |
| 199 | * change its configuration will result in an exception. | |
| 200 | *
 | |
| 201 | * | |
| 202 | * @return this for fluent use | |
| 203 | */ | |
| 204 | public ThymeleafV2EngineConfigBuilder
 clearDialects() { | |
| 205 |
1
1. clearDialects : All methods instructions replaced by: return null; → NO_COVERAGE |
dialects().clear(); |
| 206 | return this; | |
| 207 | } | |
| 208 | ||
| 209 | /** | |
| 210 | *
 | |
| 211 | * Sets the entire set of template resolvers. | |
| 212 | *
 | |
| 213 | * | |
| 214 | * @param templateResolvers | |
| 215 | * the new template resolvers. | |
| 216 | * @return this for fluent use | |
| 217 | */ | |
| 218 | public ThymeleafV2EngineConfigBuilder
 setTemplateResolvers(final Set<? extends ITemplateResolver> templateResolvers) { | |
| 219 |
1
1. setTemplateResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
this.templateResolvers().clear(); |
| 220 | this.templateResolvers().addAll(templateResolvers); | |
| 221 | return this; | |
| 222 | } | |
| 223 | ||
| 224 | /** | |
| 225 | *
 | |
| 226 | * Adds a new template resolver to the current set. | |
| 227 | *
 | |
| 228 | * | |
| 229 | * @param templateResolver | |
| 230 | * the new template resolver. | |
| 231 | * @return this for fluent use | |
| 232 | */ | |
| 233 | public ThymeleafV2EngineConfigBuilder
 addTemplateResolver(final ITemplateResolver templateResolver) { | |
| 234 |
1
1. addTemplateResolver : All methods instructions replaced by: return null; → NO_COVERAGE |
templateResolvers().add(templateResolver); |
| 235 | return this; | |
| 236 | } | |
| 237 | ||
| 238 | /** | |
| 239 | *
 | |
| 240 | * Sets a single template resolver for this template engine. | |
| 241 | *
 | |
| 242 | *
 | |
| 243 | * Calling this method is equivalent to calling | |
| 244 | * {@link #setTemplateResolvers(Set)} passing a Set with only one template | |
| 245 | * resolver. | |
| 246 | *
 | |
| 247 | * | |
| 248 | * @param templateResolver | |
| 249 | * the template resolver to be set. | |
| 250 | * @return this for fluent use | |
| 251 | */ | |
| 252 | public ThymeleafV2EngineConfigBuilder
 setTemplateResolver(final ITemplateResolver templateResolver) { | |
| 253 |
1
1. setTemplateResolver : All methods instructions replaced by: return null; → NO_COVERAGE |
templateResolvers().clear(); |
| 254 | templateResolvers().add(templateResolver); | |
| 255 | return this; | |
| 256 | } | |
| 257 | ||
| 258 | /** | |
| 259 | *
 | |
| 260 | * Sets the Cache Manager to be used. If set to null, no caches will be used | |
| 261 | * throughout the engine. | |
| 262 | *
 | |
| 263 | *
 | |
| 264 | * By default, an instance of | |
| 265 | * {@link org.thymeleaf.cache.StandardCacheManager} is set. | |
| 266 | *
 | |
| 267 | *
 | |
| 268 | * This operation can only be executed before processing templates for the | |
| 269 | * first time. Once a template is processed, the template engine is | |
| 270 | * considered to be initialized, and from then on any attempt to | |
| 271 | * change its configuration will result in an exception. | |
| 272 | *
 | |
| 273 | * | |
| 274 | * @param cacheManager | |
| 275 | * the cache manager to be set. | |
| 276 | * @return this for fluent use | |
| 277 | * | |
| 278 | */ | |
| 279 | public ThymeleafV2EngineConfigBuilder
 setCacheManager(final ICacheManager cacheManager) { | |
| 280 |
1
1. setCacheManager : All methods instructions replaced by: return null; → NO_COVERAGE |
this.cacheManager = cacheManager; |
| 281 | return this; | |
| 282 | } | |
| 283 | ||
| 284 | /** | |
| 285 | *
 | |
| 286 | * Sets the message resolvers to be used by this template engine. | |
| 287 | *
 | |
| 288 | *
 | |
| 289 | * This operation can only be executed before processing templates for the | |
| 290 | * first time. Once a template is processed, the template engine is | |
| 291 | * considered to be initialized, and from then on any attempt to | |
| 292 | * change its configuration will result in an exception. | |
| 293 | *
 | |
| 294 | * | |
| 295 | * @param messageResolvers | |
| 296 | * the Set of template resolvers. | |
| 297 | * @return this for fluent use | |
| 298 | */ | |
| 299 | public ThymeleafV2EngineConfigBuilder
 setMessageResolvers(final Set<? extends IMessageResolver> messageResolvers) { | |
| 300 |
1
1. setMessageResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
this.messageResolvers().clear(); |
| 301 | this.messageResolvers().addAll(messageResolvers); | |
| 302 | return this; | |
| 303 | } | |
| 304 | ||
| 305 | /** | |
| 306 | *
 | |
| 307 | * Adds a message resolver to the set of message resolvers to be used by the | |
| 308 | * template engine. | |
| 309 | *
 | |
| 310 | *
 | |
| 311 | * This operation can only be executed before processing templates for the | |
| 312 | * first time. Once a template is processed, the template engine is | |
| 313 | * considered to be initialized, and from then on any attempt to | |
| 314 | * change its configuration will result in an exception. | |
| 315 | *
 | |
| 316 | * | |
| 317 | * @param messageResolver | |
| 318 | * the new message resolver to be added. | |
| 319 | * @return this for fluent use | |
| 320 | */ | |
| 321 | public ThymeleafV2EngineConfigBuilder
 addMessageResolver(final IMessageResolver messageResolver) { | |
| 322 |
1
1. addMessageResolver : All methods instructions replaced by: return null; → NO_COVERAGE |
messageResolvers().add(messageResolver); |
| 323 | return this; | |
| 324 | } | |
| 325 | ||
| 326 | /** | |
| 327 | *
 | |
| 328 | * Sets a single message resolver for this template engine. | |
| 329 | *
 | |
| 330 | *
 | |
| 331 | * Calling this method is equivalent to calling | |
| 332 | * {@link #setMessageResolvers(Set)} passing a Set with only one message | |
| 333 | * resolver. | |
| 334 | *
 | |
| 335 | *
 | |
| 336 | * This operation can only be executed before processing templates for the | |
| 337 | * first time. Once a template is processed, the template engine is | |
| 338 | * considered to be initialized, and from then on any attempt to | |
| 339 | * change its configuration will result in an exception. | |
| 340 | *
 | |
| 341 | * | |
| 342 | * @param messageResolver | |
| 343 | * the message resolver to be set. | |
| 344 | * @return this for fluent use | |
| 345 | */ | |
| 346 | public ThymeleafV2EngineConfigBuilder
 setMessageResolver(final IMessageResolver messageResolver) { | |
| 347 |
1
1. setMessageResolver : All methods instructions replaced by: return null; → NO_COVERAGE |
messageResolvers().clear(); |
| 348 | messageResolvers().add(messageResolver); | |
| 349 | return this; | |
| 350 | } | |
| 351 | ||
| 352 | /** | |
| 353 | *
 | |
| 354 | * Sets the default message resolvers. These are used when no message | |
| 355 | * resolvers are set via the {@link #setMessageResolver(IMessageResolver)}, | |
| 356 | * {@link #setMessageResolvers(Set)} or | |
| 357 | * {@link #addMessageResolver(IMessageResolver)} methods. | |
| 358 | *
 | |
| 359 | *
 | |
| 360 | * This method is useful for creating subclasses of TemplateEngine | |
| 361 | * that establish default configurations for message resolvers. | |
| 362 | *
 | |
| 363 | *
 | |
| 364 | * This operation can only be executed before processing templates for the | |
| 365 | * first time. Once a template is processed, the template engine is | |
| 366 | * considered to be initialized, and from then on any attempt to | |
| 367 | * change its configuration will result in an exception. | |
| 368 | *
 | |
| 369 | * | |
| 370 | * @param defaultMessageResolvers | |
| 371 | * the default message resolvers. | |
| 372 | * @return this for fluent use | |
| 373 | */ | |
| 374 | public ThymeleafV2EngineConfigBuilder
 setDefaultMessageResolvers(final Set<? extends IMessageResolver> defaultMessageResolvers) { | |
| 375 |
1
1. setDefaultMessageResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
this.defaultMessageResolvers().clear(); |
| 376 | this.defaultMessageResolvers().addAll(defaultMessageResolvers); | |
| 377 | return this; | |
| 378 | } | |
| 379 | ||
| 380 | /** | |
| 381 | *
 | |
| 382 | * Sets the Template Mode Handlers to be used by this template engine. Every | |
| 383 | * available template mode must have its corresponding handler. | |
| 384 | *
 | |
| 385 | *
 | |
| 386 | * By default, template mode handlers set are | |
| 387 | * {@link StandardTemplateModeHandlers#ALL_TEMPLATE_MODE_HANDLERS} | |
| 388 | *
 | |
| 389 | *
 | |
| 390 | * This operation can only be executed before processing templates for the | |
| 391 | * first time. Once a template is processed, the template engine is | |
| 392 | * considered to be initialized, and from then on any attempt to | |
| 393 | * change its configuration will result in an exception. | |
| 394 | *
 | |
| 395 | * | |
| 396 | * @param templateModeHandlers | |
| 397 | * the Set of Template Mode Handlers. | |
| 398 | * @return this for fluent use | |
| 399 | */ | |
| 400 | public ThymeleafV2EngineConfigBuilder
 setTemplateModeHandlers(final Set<? extends ITemplateModeHandler> templateModeHandlers) { | |
| 401 |
1
1. setTemplateModeHandlers : All methods instructions replaced by: return null; → NO_COVERAGE |
this.templateModeHandlers().clear(); |
| 402 | this.templateModeHandlers().addAll(templateModeHandlers); | |
| 403 | return this; | |
| 404 | } | |
| 405 | ||
| 406 | /** | |
| 407 | *
 | |
| 408 | * Adds a Template Mode Handler to the set of Template Mode Handlers to be | |
| 409 | * used by the template engine. Every available template mode must have its | |
| 410 | * corresponding handler. | |
| 411 | *
 | |
| 412 | *
 | |
| 413 | * By default, template mode handlers set are | |
| 414 | * {@link StandardTemplateModeHandlers#ALL_TEMPLATE_MODE_HANDLERS} | |
| 415 | *
 | |
| 416 | *
 | |
| 417 | * This operation can only be executed before processing templates for the | |
| 418 | * first time. Once a template is processed, the template engine is | |
| 419 | * considered to be initialized, and from then on any attempt to | |
| 420 | * change its configuration will result in an exception. | |
| 421 | *
 | |
| 422 | * | |
| 423 | * @param templateModeHandler | |
| 424 | * the new Template Mode Handler to be added. | |
| 425 | * @return this for fluent use | |
| 426 | */ | |
| 427 | public ThymeleafV2EngineConfigBuilder
 addTemplateModeHandler(final ITemplateModeHandler templateModeHandler) { | |
| 428 |
1
1. addTemplateModeHandler : All methods instructions replaced by: return null; → NO_COVERAGE |
templateModeHandlers().add(templateModeHandler); |
| 429 | return this; | |
| 430 | } | |
| 431 | ||
| 432 | /** | |
| 433 | *
 | |
| 434 | * Sets the default Template Mode Handlers. These are used when no Template | |
| 435 | * Mode Handlers are set via the {@link #setTemplateModeHandlers(Set)} or | |
| 436 | * {@link #addTemplateModeHandler(ITemplateModeHandler)} methods. | |
| 437 | *
 | |
| 438 | *
 | |
| 439 | * This method is useful for creating subclasses of TemplateEngine | |
| 440 | * that establish default configurations for Template Mode Handlers. | |
| 441 | *
 | |
| 442 | *
 | |
| 443 | * By default, template mode handlers set are | |
| 444 | * {@link StandardTemplateModeHandlers#ALL_TEMPLATE_MODE_HANDLERS} | |
| 445 | *
 | |
| 446 | *
 | |
| 447 | * This operation can only be executed before processing templates for the | |
| 448 | * first time. Once a template is processed, the template engine is | |
| 449 | * considered to be initialized, and from then on any attempt to | |
| 450 | * change its configuration will result in an exception. | |
| 451 | *
 | |
| 452 | * | |
| 453 | * @param defaultTemplateModeHandlers | |
| 454 | * the default Template Mode Handlers. | |
| 455 | * @return this for fluent use | |
| 456 | */ | |
| 457 | public ThymeleafV2EngineConfigBuilder
 setDefaultTemplateModeHandlers(final Set<? extends ITemplateModeHandler> defaultTemplateModeHandlers) { | |
| 458 |
1
1. setDefaultTemplateModeHandlers : All methods instructions replaced by: return null; → NO_COVERAGE |
defaultTemplateModeHandlers().clear(); |
| 459 | defaultTemplateModeHandlers().addAll(defaultTemplateModeHandlers); | |
| 460 | return this; | |
| 461 | } | |
| 462 | ||
| 463 | @Override | |
| 464 | public TemplateEngine build() { | |
| 465 |
1
1. build : All methods instructions replaced by: return null; → NO_COVERAGE |
TemplateEngine engine = new TemplateEngine(); |
| 466 | configureDialects(engine); | |
| 467 | configureMessageResolvers(engine); | |
| 468 | configureTemplateResolvers(engine); | |
| 469 | configureTemplateModeHandlers(engine); | |
| 470 | configureCacheManager(engine); | |
| 471 | return engine; | |
| 472 | } | |
| 473 | ||
| 474 | private void configureCacheManager(TemplateEngine engine) { | |
| 475 |
1
1. configureCacheManager : All method instructions removed → NO_COVERAGE |
if (cacheManager != null) { |
| 476 | engine.setCacheManager(cacheManager); | |
| 477 | } | |
| 478 | } | |
| 479 | ||
| 480 | private void configureTemplateModeHandlers(TemplateEngine engine) { | |
| 481 |
1
1. configureTemplateModeHandlers : All method instructions removed → NO_COVERAGE |
if (defaultTemplateModeHandlers != null) { |
| 482 | engine.setDefaultTemplateModeHandlers(defaultTemplateModeHandlers); | |
| 483 | } | |
| 484 | if (templateModeHandlers != null) { | |
| 485 | engine.setTemplateModeHandlers(templateModeHandlers); | |
| 486 | } | |
| 487 | } | |
| 488 | ||
| 489 | private void configureTemplateResolvers(TemplateEngine engine) { | |
| 490 |
1
1. configureTemplateResolvers : All method instructions removed → NO_COVERAGE |
if (templateResolvers != null) { |
| 491 | engine.setTemplateResolvers(templateResolvers); | |
| 492 | } | |
| 493 | } | |
| 494 | ||
| 495 | private void configureMessageResolvers(TemplateEngine engine) { | |
| 496 |
1
1. configureMessageResolvers : All method instructions removed → NO_COVERAGE |
if (defaultMessageResolvers != null) { |
| 497 | engine.setDefaultMessageResolvers(defaultMessageResolvers); | |
| 498 | } | |
| 499 | if (messageResolvers != null) { | |
| 500 | engine.setMessageResolvers(messageResolvers); | |
| 501 | } | |
| 502 | } | |
| 503 | ||
| 504 | private void configureDialects(TemplateEngine engine) { | |
| 505 |
1
1. configureDialects : All method instructions removed → NO_COVERAGE |
if (dialects != null) { |
| 506 | engine.setDialects(dialects); | |
| 507 | } | |
| 508 | if (dialectsByPrefix != null) { | |
| 509 | engine.setDialectsByPrefix(dialectsByPrefix); | |
| 510 | } | |
| 511 | } | |
| 512 | ||
| 513 | private Set<IDialect> dialects() { | |
| 514 |
1
1. dialects : All methods instructions replaced by: return null; → NO_COVERAGE |
if (dialects == null) { |
| 515 | dialects = new HashSet<>(); | |
| 516 | } | |
| 517 | return dialects; | |
| 518 | } | |
| 519 | ||
| 520 | private Map<String, IDialect> dialectsByPrefix() { | |
| 521 |
1
1. dialectsByPrefix : All methods instructions replaced by: return null; → NO_COVERAGE |
if (dialectsByPrefix == null) { |
| 522 | dialectsByPrefix = new HashMap<>(); | |
| 523 | } | |
| 524 | return dialectsByPrefix; | |
| 525 | } | |
| 526 | ||
| 527 | private Set<IMessageResolver> messageResolvers() { | |
| 528 |
1
1. messageResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
if (messageResolvers == null) { |
| 529 | messageResolvers = new HashSet<>(); | |
| 530 | } | |
| 531 | return messageResolvers; | |
| 532 | } | |
| 533 | ||
| 534 | private Set<ITemplateResolver> templateResolvers() { | |
| 535 |
1
1. templateResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
if (templateResolvers == null) { |
| 536 | templateResolvers = new HashSet<>(); | |
| 537 | } | |
| 538 | return templateResolvers; | |
| 539 | } | |
| 540 | ||
| 541 | private Set<IMessageResolver> defaultMessageResolvers() { | |
| 542 |
1
1. defaultMessageResolvers : All methods instructions replaced by: return null; → NO_COVERAGE |
if (defaultMessageResolvers == null) { |
| 543 | defaultMessageResolvers = new HashSet<>(); | |
| 544 | } | |
| 545 | return defaultMessageResolvers; | |
| 546 | } | |
| 547 | ||
| 548 | private Set<ITemplateModeHandler> templateModeHandlers() { | |
| 549 |
1
1. templateModeHandlers : All methods instructions replaced by: return null; → NO_COVERAGE |
if (templateModeHandlers == null) { |
| 550 | templateModeHandlers = new HashSet<>(); | |
| 551 | } | |
| 552 | return templateModeHandlers; | |
| 553 | } | |
| 554 | ||
| 555 | private Set<ITemplateModeHandler> defaultTemplateModeHandlers() { | |
| 556 |
1
1. defaultTemplateModeHandlers : All methods instructions replaced by: return null; → NO_COVERAGE |
if (defaultTemplateModeHandlers == null) { |
| 557 | defaultTemplateModeHandlers = new HashSet<>(); | |
| 558 | } | |
| 559 | return defaultTemplateModeHandlers; | |
| 560 | } | |
| 561 | ||
| 562 | } | |
Mutations | ||
| 28 |
1.1 |
|
| 69 |
1.1 |
|
| 95 |
1.1 |
|
| 119 |
1.1 |
|
| 141 |
1.1 |
|
| 163 |
1.1 |
|
| 187 |
1.1 |
|
| 205 |
1.1 |
|
| 219 |
1.1 |
|
| 234 |
1.1 |
|
| 253 |
1.1 |
|
| 280 |
1.1 |
|
| 300 |
1.1 |
|
| 322 |
1.1 |
|
| 347 |
1.1 |
|
| 375 |
1.1 |
|
| 401 |
1.1 |
|
| 428 |
1.1 |
|
| 458 |
1.1 |
|
| 465 |
1.1 |
|
| 475 |
1.1 |
|
| 481 |
1.1 |
|
| 490 |
1.1 |
|
| 496 |
1.1 |
|
| 505 |
1.1 |
|
| 514 |
1.1 |
|
| 521 |
1.1 |
|
| 528 |
1.1 |
|
| 535 |
1.1 |
|
| 542 |
1.1 |
|
| 549 |
1.1 |
|
| 556 |
1.1 |


PDFOPT
Section: Ghostscript Tools (1)Updated: 31 July 2009
Index Return to Main Contents
NAME
pdfopt - Ghostscript PDF OptimizerSYNOPSIS
pdfopt [ options ] input.pdf output.pdfDESCRIPTION
pdfopt uses gs(1) to convert the Adobe Portable Document Format (PDF) file "input.pdf" to a so-called optimized form in "output.pdf". Optimization puts the elements of the file into a more linear order and adds "hint" pointers, allowing Adobe's Acrobat(TM) products to display individual pages of the file more quickly when accessing the file through a network.Note: input.pdf and output.pdf must not be the same. If they are, the file will probably be destroyed. pdfopt currently does not check for this.
FILES
Run "gs -h" to find the location of Ghostscript documentation on your system, from which you can get more details.SEE ALSO
"Linearized PDF" in Adobe's PDF reference manual, http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdfVERSION
This document was last revised for Ghostscript version 8.70.AUTHOR
Artifex Software, Inc. are the primary maintainers of Ghostscript.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:07 GMT, December 24, 2015


PROFILE
Afam Jude
Age: 42
Email<EMAIL_ADDRESS>Location: Alimosho
Phone Number:<PHONE_NUMBER>6
Edit your profile
Change your password
Do you have the intention of running for a government office? click the button below
VOTING HISTORY
| S/N | Office Type | Office Name | Party | Logo | Candidate | Result |
|---|---|---|---|---|---|---|
| 1 | Local Government | LGA Chairman | Accord | Rotimi Faleti | Won | |
| 2 | Federal | President | APC | Muhammad Buhari | Pending | |
| 3 | State | Governor | APC | Babajide Sanwo olu | Won | |
| 4 | Legislative | Senate | PDP | Viv Rhodes | Won |


- LastWriteWins - Class in com.cyberfront.crdt
-
The LastWriteWins class implements a Last Write Wins commutative CRDT.
- LastWriteWins() - Constructor for class com.cyberfront.crdt.LastWriteWins
-
- LastWriteWins.TrialResult - Class in com.cyberfront.crdt
-
The Class TrialResult is used to process a collection of operations provided to it.
- LOG_JSON_PROCESSING_EXCEPTIONS - Static variable in class com.cyberfront.crdt.GenericCRDTManager
-
Flag to determine whether to display situations where the Java object could not be reconstructed from a JSON document
- LOG_JSON_PROCESSING_EXCEPTIONS - Static variable in class com.cyberfront.crdt.LastWriteWins.TrialResult
-
Flag to indicate whether invalid operations are to be logged to the console
- logger - Static variable in class com.cyberfront.crdt.CRDTManager
-
The Constant logger used to generate log entries
- logger - Static variable in class com.cyberfront.crdt.GenericCRDTManager
-
A logger for writing to the local log output.
- logger - Static variable in class com.cyberfront.crdt.LastWriteWins
-
Logger for writing data to the log.
- logger - Static variable in class com.cyberfront.crdt.operations.AbstractOperation
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.operations.CreateOperation
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.operations.DeleteOperation
-
Logger to use when displaying state information
- logger - Variable in class com.cyberfront.crdt.operations.ReadOperation
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.operations.UpdateOperation
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.sample.data.AbstractDataType
-
Logger to use when displaying state information
- logger - Variable in class com.cyberfront.crdt.sample.simlation.Executive
-
The logger to log elements to the Log4J output
- logger - Static variable in class com.cyberfront.crdt.sample.simlation.Message
-
A logger for writing to the local log output.
- logger - Static variable in class com.cyberfront.crdt.sample.simlation.MessageRouter
-
A logger for writing to the local log output.
- logger - Static variable in class com.cyberfront.crdt.sample.simlation.Node
-
Constant logger used to produce output during execution of the simulation.
- logger - Static variable in class com.cyberfront.crdt.sample.simlation.SimCRDTManager
-
The Constant logger.
- logger - Static variable in class com.cyberfront.crdt.support.Support
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.unittest.data.Test01Create.CreateTest
-
Logger to use when displaying state information
- logger - Variable in class com.cyberfront.crdt.unittest.data.Test02Update.UpdateTest
-
Logger to use when displaying state information
- logger - Variable in class com.cyberfront.crdt.unittest.data.Test03Clone.CloneTest
-
Logger to use when displaying state information
- logger - Variable in class com.cyberfront.crdt.unittest.data.Test04Json
-
Logger to use when displaying state information
- logger - Static variable in class com.cyberfront.crdt.unittest.simulator.Test01Simulation.SimulationTest
-
Logger to use when displaying state information
- LONG_SEQUENCE - Static variable in class com.cyberfront.crdt.support.Support
-
A pattern for generating a sequence of words four words


perkt
. io
how it works
demo
the team
Akshay Ivatury
Hardware Developer
Abhishek Verma
Back End Developer
Timothy Ong
Back End Developer
Chris Jang
Full Stack Developer
HackIllinois
2015


The goal of the course is to give an overview of web based information systems development and standards. The course provides foundation for next level web development courses.
Student knows how to create HTML pages Student knows how to style HTML pages with CSS Student knows how to use Javascript Student knows how to use PHP Student knows how to write MySQL queries and make use of them in the PHP application Student knows how to read and explain HTML, CSS, JS, PHP code and MySQL queries
Resize the browser window to see how the content respond to the resizing.


If you have problems, please login your mailbox and send mail to<EMAIL_ADDRESS>titled with tiny-modal.js issue.
Or click send mail to open the default mail app in your OS.
Be sure content of mail contains name, your problems, contact information.


Hong Kong Gems
"... a fine way to capture a piece of the magic of a unique city. The drama, the charm and the beauty of Hong Kong is all here-just as is its breathless energy."
- Nury Vittachi, Hong Kong: The City of Dreams
© Eugenia Chow


Summary
In this test the penetration tester checks whether a they can make a Heap overflow that exploits a memory segment.
Heap is a memory segment that is used for storing dynamically allocated data and global variables. Each chunk of memory in heap consists of boundary tags that contain memory management information.
When a heap-based buffer is overflowed the control information in these tags is overwritten. When the heap management routine frees the buffer, a memory address overwrite takes place leading to an access violation. When the overflow is executed in a controlled fashion, the vulnerability would allow an adversary to overwrite a desired memory location with a user-controlled value. In practice, an attacker would be able to overwrite function pointers and various addresses stored in structures like GOT, .dtors or TEB with the address of a malicious payload.
There are numerous variants of the heap overflow (heap corruption) vulnerability that can allow anything from overwriting function pointers to exploiting memory management structures for arbitrary code execution. Locating heap overflows requires closer examination in comparison to stack overflows, since there are certain conditions that need to exist in the code for these vulnerabilities to be exploitable.
How to Test
Black Box testing
The principles of black box testing for heap overflows remain the same as stack overflows. The key is to supply as input strings that are longer than expected. Although the test process remains the same, the results that are visible in a debugger are significantly different. While in the case of a stack overflow, an instruction pointer or SEH overwrite would be apparent, this does not hold true for a heap overflow condition. When debugging a windows program, a heap overflow can appear in several different forms, the most common one being a pointer exchange taking place after the heap management routine comes into action. Shown below is a scenario that illustrates a heap overflow vulnerability.
The two registers shown, EAX and ECX, can be populated with user supplied addresses which are a part of the data that is used to overflow the heap buffer. One of the addresses can point to a function pointer which needs to be overwritten, for example UEF (Unhandled Exception filter), and the other can be the address of user supplied code that needs to be executed.
When the MOV instructions shown in the left pane are executed, the overwrite takes place and, when the function is called, user supplied code gets executed. As mentioned previously, other methods of testing such vulnerabilities include reverse engineering the application binaries, which is a complex and tedious process, and using fuzzing techniques.
Gray Box testing
When reviewing code, one must realize that there are several avenues where heap related vulnerabilities may arise. Code that seems innocuous at the first glance can actually be vulnerable under certain conditions. Since there are several variants of this vulnerability, we will cover only the issues that are predominant.
Most of the time, heap buffers are considered safe by a lot of developers who do not hesitate to perform insecure operations like strcpy( ) on them. The myth that a stack overflow and instruction pointer overwrite are the only means to execute arbitrary code proves to be hazardous in case of code shown below:-
int main(int argc, char *argv[])
{
……
vulnerable(argv[1]);
return 0;
}
int vulnerable(char *buf)
{
HANDLE hp = HeapCreate(0, 0, 0);
HLOCAL chunk = HeapAlloc(hp, 0, 260);
strcpy(chunk, buf); ''' Vulnerability'''
……..
return 0;
}
In this case, if buf exceeds 260 bytes, it will overwrite pointers in the adjacent boundary tag, facilitating the overwrite of an arbitrary memory location with 4 bytes of data once the heap management routine kicks in.
Lately, several products, especially anti-virus libraries, have been affected by variants that are combinations of an integer overflow and copy operations to a heap buffer. As an example, consider a vulnerable code snippet, a part of code responsible for processing TNEF filetypes, from Clam Anti Virus 0.86.1, source file tnef.c and function tnef_message( ):
string = cli_malloc(length + 1); ''' Vulnerability'''
if(fread(string, 1, length, fp) != length) {''' Vulnerability'''
free(string);
return -1;
}
The malloc in line 1 allocates memory based on the value of length, which happens to be a 32 bit integer. In this particular example, length is user-controllable and a malicious TNEF file can be crafted to set length to ‘-1’, which would result in malloc( 0 ). Therefore, this malloc would allocate a small heap buffer, which would be 16 bytes on most 32 bit platforms (as indicated in malloc.h).
And now, in line 2, a heap overflow occurs in the call to fread( ). The 3rd argument, in this case length, is expected to be a size_t variable. But if it’s going to be ‘-1’, the argument wraps to 0xFFFFFFFF, thus copying 0xFFFFFFFF bytes into the 16 byte buffer.
Static code analysis tools can also help in locating heap related vulnerabilities such as “double free” etc. A variety of tools like RATS, Flawfinder and ITS4 are available for analyzing C-style languages.
Tools


- closeConnection() - Method in class eu.citypulse.uaso.gdiclient.CpGdiInterface
-
discard database connection
- closeEvent(UUID, Timestamp) - Method in class eu.citypulse.uaso.gdiclient.CpGdiInterface
-
Set a stop / end time of the validity of the event
- CpAmenity - Class in eu.citypulse.uaso.gdiclient.objects
-
Defining OSM Object
- CpAmenity(long, String, PGgeometry, PGgeometry, double) - Constructor for class eu.citypulse.uaso.gdiclient.objects.CpAmenity
-
- CpClientDeepSearch - Class in eu.citypulse.uaso.gdiclient.trials
-
Test and Example calass for Geospatial Data Infrastructure(GDI) client of
CityPulse
- CpClientDeepSearch() - Constructor for class eu.citypulse.uaso.gdiclient.trials.CpClientDeepSearch
-
- CpClientDirectComparison - Class in eu.citypulse.uaso.gdiclient.trials
-
Test and Example calass for Geospatial Data Infrastructure(GDI) client of
CityPulse
- CpClientDirectComparison() - Constructor for class eu.citypulse.uaso.gdiclient.trials.CpClientDirectComparison
-
- CpClientExample - Class in eu.citypulse.uaso.gdiclient
-
Test and Example calass for Geospatial Data Infrastructure(GDI) client of CityPulse
- CpClientExample() - Constructor for class eu.citypulse.uaso.gdiclient.CpClientExample
-
- CpClientExampleStockholm - Class in eu.citypulse.uaso.gdiclient
-
Test and Example calass for Geospatial Data Infrastructure(GDI) client of CityPulse
- CpClientExampleStockholm() - Constructor for class eu.citypulse.uaso.gdiclient.CpClientExampleStockholm
-
- CpClientRouteCreator - Class in eu.citypulse.uaso.gdiclient.trials
-
Test and Example calass for Geospatial Data Infrastructure(GDI) client of CityPulse
- CpClientRouteCreator() - Constructor for class eu.citypulse.uaso.gdiclient.trials.CpClientRouteCreator
-
- CpExamineDistanceResearch - Class in eu.citypulse.uaso.gdiclient.trials
-
- CpExamineDistanceResearch() - Constructor for class eu.citypulse.uaso.gdiclient.trials.CpExamineDistanceResearch
-
- CpGdiEvent - Class in eu.citypulse.uaso.gdiclient.persistdata
-
- CpGdiEvent(UUID, String, PGpoint) - Constructor for class eu.citypulse.uaso.gdiclient.persistdata.CpGdiEvent
-
- CpGdiEventStream - Class in eu.citypulse.uaso.gdiclient.persistdata
-
- CpGdiEventStream(UUID, String, PGpoint) - Constructor for class eu.citypulse.uaso.gdiclient.persistdata.CpGdiEventStream
-
- CpGdiInterface - Class in eu.citypulse.uaso.gdiclient
-
Geospatial Data Infrastructure(GDI) client for CityPulse
http://www.ict-citypulse.eu/
- CpGdiInterface() - Constructor for class eu.citypulse.uaso.gdiclient.CpGdiInterface
-
Initialisation of the database connection and prepared statements with
Configuration fom GdiConfig class
- CpGdiInterface(String, int, String, String, String) - Constructor for class eu.citypulse.uaso.gdiclient.CpGdiInterface
-
Initialisation of the database connection and prepared statements.
- CpGdiPersistable - Class in eu.citypulse.uaso.gdiclient.persistdata
-
- CpGdiPersistable() - Constructor for class eu.citypulse.uaso.gdiclient.persistdata.CpGdiPersistable
-
- CpGdiSensorStream - Class in eu.citypulse.uaso.gdiclient.persistdata
-
- CpGdiSensorStream(UUID, String, PGpoint) - Constructor for class eu.citypulse.uaso.gdiclient.persistdata.CpGdiSensorStream
-
- CPOneParkingGarageTest - Class in eu.citypulse.uaso.gdiclient.trials
-
- CPOneParkingGarageTest() - Constructor for class eu.citypulse.uaso.gdiclient.trials.CPOneParkingGarageTest
-
- CpRoute - Class in eu.citypulse.uaso.gdiclient.routes
-
- CpRoute(PGgeometry, int, int, double, Long[], Double[], Double[]) - Constructor for class eu.citypulse.uaso.gdiclient.routes.CpRoute
-
- CpRoute(PGgeometry, int, int, double, Long[], Double[]) - Constructor for class eu.citypulse.uaso.gdiclient.routes.CpRoute
-
Constructor
- CpRouteRequest - Class in eu.citypulse.uaso.gdiclient.routes
-
- CpRouteRequest(int, PGgeometry, int, PGgeometry, String) - Constructor for class eu.citypulse.uaso.gdiclient.routes.CpRouteRequest
-


Live feed showing:
latest images
Thumbnail size:
Refresh:
5 sec
10 sec
30 sec
Powered by
Elvis
©
WoodWing Software


Hey Dry!
We know that many of you are graduating – congrats!! *If you are in an FMLA or affiliated group, t* [ http://www.surveymonkey.com/s/N662ZZY ]*ake this survey and tell us about the events your group put on this semester and the organizing your group did!* [ http://www.surveymonkey.com/s/N662ZZY ] We want to stay connected to incoming leadership, so please pass this along to the rising E-board!
[ http://www.surveymonkey.com/s/N662ZZY ]
It was so great to see many of you at the 2015 National Young Feminist Leadership Conference; activists from across the country built community, learned from one another, and Feminist Campus launched our Sex-Positivity Toolkit [ http://feministcampus.org/campaigns/sex-positivity/ ]!

Also, for graduating feminists and feminist friends, join our alumni network [ http://org.salsalabs.com/o/1400/p/salsa/web/common/public/signup?signup_page_KEY=8074 ]. Plus check out our Feminist Job Board [ http://jobs.feminist.org/ ], the Feminist Campus team is expanding – apply today [ http://jobs.feminist.org/ ]!
*Take the survey here!* [ https://www.surveymonkey.com/s/N662ZZY ]
Make sure to take a few minutes to *fill out our short End-Of-Semester survey [ http://www.surveymonkey.com/s/N662ZZY ]* so we can help you hit the ground running when you get back to campus, and congratulations on all of your hard work!
For equality and empowerment,
*Feminist Campus Team*
“Alyssa, Edwith, duVergne, Marzia and Nancy
<EMAIL_ADDRESS>[<EMAIL_ADDRESS>]
P.S. - Have questions about the survey or just wanna chat? Reach out to an organizer!
* Alyssa Seidorf: aseidorf [<EMAIL_ADDRESS><EMAIL_ADDRESS>[<EMAIL_ADDRESS>]
* Edwith Theogene<EMAIL_ADDRESS>[<EMAIL_ADDRESS>]
* Nancy Aragon: naragon [<EMAIL_ADDRESS><EMAIL_ADDRESS>[<EMAIL_ADDRESS>]


'Drunk' passenger rips plane door from hinges and makes emergency slide unfold
The Thai Smile flight from Chiang Mai in northern Thailand to the capital Bangkok was delayed by nearly 90 minutes
by Lorraine KingA "drunken" tourist sparked panic after tearing opening the emergency exit door moments before a plane was due to take-off.
The dramatic moment happened on an Airbus A320 as 86 passengers were ready to taxi across the tarmac in Chiang Mai, northern Thailand, on Thursday afternoon.
But the tourist - who was allegedly intoxicated - rushed to the wing door and ripped it from the hinges causing the inflatable slide to deploy.
Shocked passengers screamed while airport security staff pinned the blonde-haired man to the ground.
Local media dubbed him a "crazed foreigner".
The want-away passenger was pictured wearing jeans, a blue shirt and white trainers after having his hands and feet cuffed inside the airport.
Staff from the Thai Smile airline said that more than 600,000 baht in damage had been caused by the incident.
The traveller, who has not been named, was detained in custody while airport officials investigated the incident.
One passenger onboard the plane said the tourist was "drunk" and had "opened the emergency door causing a lot of drama and a delay".
The flight, WE169, had been due to depart at 3.40pm but was delayed. It eventually took off at around 5pm for domestic destination Bangkok.
A spokesman for flag carrier Thai Airway's low cost short haul subsidiary Thai Smile apologised for the incident.
They said: "The incident occurred when the plane was about to depart from Chiang Mai International Airport for Suvarnabhumi International Airport in Bangkok.
"After the aircraft door had been successfully closed there was a wait for a taxi to take off.
"A foreign male passenger ran to open the emergency exit door next to the left wing of the plane.
"The incident caused the emergency door to be opened entirely and an emergency slide unfolded.
"The captain immediately suspended the flight and notified ground officials and security personnel to control the incident.
''The foreign man was detained but it it not yet clear what his motivation was to do this."


| | |
- Method resolution order:
- smart_install_data
- install_data
- Command
Methods defined here:
- run(self)
Methods inherited from install_data:
- finalize_options(self)
- get_inputs(self)
- get_outputs(self)
- initialize_options(self)
Data and other attributes inherited from install_data:
- boolean_options = ['force']
- description = 'install data files'
- user_options = [('install-dir=', 'd', 'base directory for installing data files (default: installation base dir)'), ('root=', None, 'install everything relative to this alternate root directory'), ('force', 'f', 'force installation (overwrite existing files)')]
Methods inherited from Command:
- __getattr__(self, attr)
- __init__(self, dist)
- Create and initialize a new Command object. Most importantly,
invokes the 'initialize_options()' method, which is the real
initializer and depends on the actual command being
instantiated.
- announce(self, msg, level=1)
- If the current verbosity level is of greater than or equal to
'level' print 'msg' to stdout.
- copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1, link=None, level=1)
- Copy a file respecting verbose, dry-run and force flags. (The
former two default to whatever is in the Distribution object, and
the latter defaults to false for commands that don't define it.)
- copy_tree(self, infile, outfile, preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1)
- Copy an entire directory tree respecting verbose, dry-run,
and force flags.
- debug_print(self, msg)
- Print 'msg' to stdout if the global DEBUG (taken from the
DISTUTILS_DEBUG environment variable) flag is true.
- dump_options(self, header=None, indent='')
- ensure_dirname(self, option)
- ensure_filename(self, option)
- Ensure that 'option' is the name of an existing file.
- ensure_finalized(self)
- ensure_string(self, option, default=None)
- Ensure that 'option' is a string; if not defined, set it to
'default'.
- ensure_string_list(self, option)
- Ensure that 'option' is a list of strings. If 'option' is
currently a string, we split it either on /,\s*/ or /\s+/, so
"foo bar baz", "foo,bar,baz", and "foo, bar baz" all become
["foo", "bar", "baz"].
- execute(self, func, args, msg=None, level=1)
- get_command_name(self)
- get_finalized_command(self, command, create=1)
- Wrapper around Distribution's 'get_command_obj()' method: find
(create if necessary and 'create' is true) the command object for
'command', call its 'ensure_finalized()' method, and return the
finalized command object.
- get_sub_commands(self)
- Determine the sub-commands that are relevant in the current
distribution (ie., that need to be run). This is based on the
'sub_commands' class attribute: each tuple in that list may include
a method that we call to determine if the subcommand needs to be
run for the current distribution. Return a list of command names.
- make_archive(self, base_name, format, root_dir=None, base_dir=None)
- make_file(self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1)
- Special case of 'execute()' for operations that process one or
more input files and generate one output file. Works just like
'execute()', except the operation is skipped and a different
message printed if 'outfile' already exists and is newer than all
files listed in 'infiles'. If the command defined 'self.force',
and it is true, then the command is unconditionally run -- does no
timestamp checks.
- mkpath(self, name, mode=511)
- move_file(self, src, dst, level=1)
- Move a file respectin dry-run flag.
- reinitialize_command(self, command, reinit_subcommands=0)
- # XXX rename to 'get_reinitialized_command()'? (should do the
# same in dist.py, if so)
- run_command(self, command)
- Run some other command: uses the 'run_command()' method of
Distribution, which creates and finalizes the command object if
necessary and then invokes its 'run()' method.
- set_undefined_options(self, src_cmd, *option_pairs)
- Set the values of any "undefined" options from corresponding
option values in some other command object. "Undefined" here means
"is None", which is the convention used to indicate that an option
has not been changed between 'initialize_options()' and
'finalize_options()'. Usually called from 'finalize_options()' for
options that depend on some other command rather than another
option of the same command. 'src_cmd' is the other command from
which option values will be taken (a command object will be created
for it if necessary); the remaining arguments are
'(src_option,dst_option)' tuples which mean "take the value of
'src_option' in the 'src_cmd' command object, and copy it to
'dst_option' in the current command object".
- spawn(self, cmd, search_path=1, level=1)
- Spawn an external command respecting dry-run flag.
- warn(self, msg)
Data and other attributes inherited from Command:
- sub_commands = []
|


View Website
Submit Request
Get Pending Requests
Get Resolved Requests
View Profile
Logout
View As Manager