Examples of protect()


Examples of com.aspose.words.Document.protect()

public class AsposeProtectDoc
{
  public static void main(String[] args) throws Exception
  {
    Document doc = new Document("data/document.doc");
    doc.protect(ProtectionType.READ_ONLY);
//    doc.protect(ProtectionType.ALLOW_ONLY_COMMENTS);
//    doc.protect(ProtectionType.ALLOW_ONLY_FORM_FIELDS);
//    doc.protect(ProtectionType.ALLOW_ONLY_REVISIONS);
   
    doc.save("data/AsposeProtect.doc", SaveFormat.DOC);
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.PDDocument.protect()

                        ppp.addRecipient(recip);

                        ppp.setEncryptionKeyLength(keyLength);

                        document.protect(ppp);
                    }
                    else
                    {
                        StandardProtectionPolicy spp =
                            new StandardProtectionPolicy(ownerPassword, userPassword, ap);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        @Override
        public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {

            final ModelNode address = new ModelNode();
            address.add(SUBSYSTEM, SUBSYSTEM_NAME);
            address.protect();
            final ModelNode subsystem = Util.getEmptyOperation(ADD, address);
            list.add(subsystem);

            requireNoAttributes(reader);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

    @Override
    public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {

        final ModelNode address = new ModelNode();
        address.add(SUBSYSTEM, RemotingExtension.SUBSYSTEM_NAME);
        address.protect();
        final ModelNode subsystem = Util.getEmptyOperation(ADD, address);
        list.add(subsystem);

        requireNoAttributes(reader);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

            throw unexpectedAttribute(reader, 0);
        }

        final ModelNode address = new ModelNode();
        address.add(SUBSYSTEM, LoggingExtension.SUBSYSTEM_NAME);
        address.protect();

        list.add(LoggingExtension.NewLoggingSubsystemAdd.createOperation(address));

        // Elements
        final Set<String> loggerNames = new HashSet<String>();
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        node.get(REQUEST_PROPERTIES, INCLUDE_RUNTIME, DESCRIPTION).set(bundle.getString("global.read-resource.include-runtime"));
        node.get(REQUEST_PROPERTIES, INCLUDE_RUNTIME, NILLABLE).set(true);
        node.get(REPLY_PROPERTIES, TYPE).set(ModelType.OBJECT);
        //TODO value type
        node.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString("global.read-resource.reply"));
        node.protect();

        return node;
    }

    public static ModelNode getReadAttributeOperationDescription(Locale locale) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        node.get(REQUEST_PROPERTIES, NAME, DESCRIPTION).set(bundle.getString("global.read-attribute.name"));
        node.get(REQUEST_PROPERTIES, NAME, NILLABLE).set(false);
        node.get(REPLY_PROPERTIES, TYPE).set(ModelType.OBJECT);
        node.get(REPLY_PROPERTIES, VALUE_TYPE).set(bundle.getString("global.read-attribute.reply.type"));
        node.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString("global.read-attribute.reply"));
        node.protect();

        return node;
    }

    public static ModelNode getWriteAttributeOperationDescription(Locale locale) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        node.get(REQUEST_PROPERTIES, NAME, NILLABLE).set(false);
        node.get(REQUEST_PROPERTIES, VALUE, TYPE).set(ModelType.STRING);
        node.get(REQUEST_PROPERTIES, VALUE, DESCRIPTION).set(bundle.getString("global.write-attribute.value"));
        node.get(REQUEST_PROPERTIES, VALUE, NILLABLE).set(true);
        node.get(REQUEST_PROPERTIES, VALUE, REQUIRED).set(false);
        node.protect();

        return node;
    }

    public static ModelNode getReadChildrenNamesOperationDescription(Locale locale) {
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        node.get(REQUEST_PROPERTIES, CHILD_TYPE, NILLABLE).set(false);
        node.get(REPLY_PROPERTIES, TYPE).set(ModelType.LIST);
        node.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString("global.read-children-names.reply"));
        node.get(REPLY_PROPERTIES, VALUE_TYPE).set(ModelType.STRING);

        node.protect();
        return node;
    }

    public static ModelNode getReadChildrenTypesOperationDescription(Locale locale) {
        ResourceBundle bundle = getResourceBundle(locale);
View Full Code Here

Examples of org.jboss.dmr.ModelNode.protect()

        node.get(REPLY_PROPERTIES, TYPE).set(ModelType.LIST);
        node.get(REPLY_PROPERTIES, DESCRIPTION).set(bundle.getString("global.read-children-types.reply"));
        node.get(REPLY_PROPERTIES, VALUE_TYPE).set(ModelType.STRING);

        node.protect();
        return node;
    }

    public static ModelNode getReadChildrenResourcesOperationDescription(Locale locale) {
        ResourceBundle bundle = getResourceBundle(locale);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.