Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
160 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,34 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.directory.api.ldap.extras.controls.ad; | ||
|
||
|
||
import org.apache.directory.api.ldap.model.message.Control; | ||
|
||
|
||
/** | ||
* The Active Directory Tree Delete control. It is used to delete object and its sub-objects. | ||
* | ||
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> | ||
*/ | ||
public interface TreeDelete extends Control | ||
{ | ||
/** Tree Delete control OID */ | ||
String OID = "1.2.840.113556.1.4.805"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,59 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.directory.api.ldap.extras.controls.ad; | ||
|
||
import org.apache.directory.api.ldap.model.message.controls.AbstractControl; | ||
|
||
|
||
/** | ||
* The Active Directory Tree Delete control implementation. | ||
* | ||
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> | ||
*/ | ||
public class TreeDeleteImpl extends AbstractControl implements TreeDelete | ||
{ | ||
/** | ||
* Default constructor | ||
*/ | ||
public TreeDeleteImpl() | ||
{ | ||
super( OID ); | ||
} | ||
|
||
|
||
/** | ||
* Sets criticality when creating. | ||
* | ||
* @param isCritical true if critical, false otherwise. | ||
*/ | ||
public TreeDeleteImpl( boolean isCritical ) | ||
{ | ||
super( OID ); | ||
setCritical( isCritical ); | ||
} | ||
|
||
/** | ||
* @see Object#toString() | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "TreeDelete control"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,57 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
*/ | ||
package org.apache.directory.api.ldap.extras.controls.ad_impl; | ||
|
||
|
||
import org.apache.directory.api.ldap.codec.api.AbstractControlFactory; | ||
import org.apache.directory.api.ldap.codec.api.ControlFactory; | ||
import org.apache.directory.api.ldap.codec.api.LdapApiService; | ||
import org.apache.directory.api.ldap.extras.controls.ad.TreeDelete; | ||
import org.apache.directory.api.ldap.extras.controls.ad.TreeDeleteImpl; | ||
|
||
|
||
/** | ||
* A codec {@link ControlFactory} implementation for {@link TreeDelete} controls. | ||
* | ||
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> | ||
* @version $Rev$, $Date$ | ||
*/ | ||
public class TreeDeleteFactory extends AbstractControlFactory<TreeDelete> | ||
{ | ||
/** | ||
* Creates a new instance of TreeDeleteFactory. | ||
* | ||
* @param codec The LDAP codec | ||
*/ | ||
public TreeDeleteFactory( LdapApiService codec ) | ||
{ | ||
super( codec, TreeDelete.OID ); | ||
} | ||
|
||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public TreeDelete newControl() | ||
{ | ||
return new TreeDeleteImpl(); | ||
} | ||
} |